You should use the equals() method do compare Strings not the == operator.
Type: Posts; User: Norm
You should use the equals() method do compare Strings not the == operator.
Use the substring method to get parts of a String.
The split() method would be the easiest.
Other choices would be the indexOf and substring methods.
To see what split() does, try writing a 3 line program with a sample input String. Call the...
What happens to the value returned by the split() method?
Not yet. You are still ignoring what the split method returns.
Did what you posted compile? Try compiling before posting to see if the compiler likes your code.
You should read the API doc for the String class to see how to use its methods.
For example the split method returns a value that you will use. Your code ignores what is returned.
You could use the String class's split method on the input String, then use the substring method on each substring to remove the leading R or C character. Then use the Integer class's parse method to...
How do you determine the "correct" square to color?
When do you want them to go back to the default? Is it when some event happens?
Please Edit your post and wrap your code with
<YOUR CODE HERE> to get highlighting
Look at using a JDialog to prompt the user for his choices.
Putting the button objects in an arraylist might...