First, don't spoon feed solutions to OPs. Second, perhaps the OP wanted to figure out how to do it without using a reverse().
Regards,
Jim
Type: Posts; User: jim829
First, don't spoon feed solutions to OPs. Second, perhaps the OP wanted to figure out how to do it without using a reverse().
Regards,
Jim
This is basic Java so you should check out the tutorials in my signature. The questions you raise are covered in there.
Regards,
Jim
Your highlighted code is difficult to read.
Regards,
Jim
I may have misunderstood the question. I thought the OP didn't want to be able to press the button again, once it has been changed.
Regards,
Jim
The easiest way would be to disable the button. It will then change the textual appearance to indicate it has been disabled.
JButton b = myButton("X");
b.setEnabled(false);
Regards,
Jim
Extending JFrame is not a good practice. Just make an instance of it and use that. If you're going to paint, then extend JPanel and override paintComponent(Graphics g). And add the JPanel to your...
Without the parentheses, the evaluation order is strictly left to right. Once you get a valid first user name, the rest is not evaluated because if the first part is true, the rest is irrelevant so...
Try putting some print statements before and after the shuffle method to check and see if it is working.
Regards,
Jim
Veretimothy,
Please read this: The Problem With Spoonfeeding"
Regards,
Jim
What exactly do the rows look like? Can you provide an example?
Regards,
Jim
Glad we could help.
Regards,
Jim
Your post has nothing to do with Java. Please contact the distributor of the software and seek assistance from them.
Regards,
Jim
Why not read each row as a String and compare the strings? Otherwise, what happens if you have the following four values? And why are you splitting on a semi-colon and not a comma?
1, 2, "three,...
In what way didn't it work? Did you get an error message?
Regards,
Jim
Please don't do this:
catch (InputMismatchException e) { //this is the error we are catching
}
As you are not catching anything. At a minimum, do this:
catch (InputMismatchException e)...
I recommend you put in a print statement in your loop to print out the values of n, rev, and a to see what is happening.
Regards,
Jim
Please read this: http://www.javaprogrammingforums.com/cafe/9544-problem-spoon-feeding.html
Regards,
Jim
I am unfamiliar with your classes but some of this looks strange.
public void phoneCall()
{
Gadget mobPhone = Devices.get(getDisplayNum());
if (getDisplayNum() != -1 &&...
It tells you right there. The phoneCall method does not expect any arguments. But you are calling it like this.
phone.phoneCall(getDisplayNum(), getDuration());
It should be called like...
Please edit your post and place the formatted code between code tags (See BBCodes below for more info). You can do this by going to the advanced editor, highlighting your code and clicking the #...
You are trying to instantiate the listener before it's defined. Did you really mean to put this method inside the constructor? You can fix this one of two ways.
1. Move the inner class...
Show me what you have done.
Regards,
Jim
And your other question that was answered?
Regards,
Jim
This was answered yesterday. Please don't double post on this forum.
Regards,
Jim
Please place code between code tags (see BBcodes below for more info). And you didn't explain what problems you were having and whether they were, compiler problems, exceptions being thrown, or...