I'm a beginner myself, but I'd probably read the string as a set of char's, and say after 3 char's add '-', after another 3 char's add '-'....
Type: Posts; User: MXA92
I'm a beginner myself, but I'd probably read the string as a set of char's, and say after 3 char's add '-', after another 3 char's add '-'....
I find images are the best way of getting the point across easier so if you take a quick look at the image, you'll see what I have so far :)...
Oh yeah, that was substantially better:
public void mouseEntered(MouseEvent e)
{
((Square)e.getSource()).enter();
}
Thank you again Norm :)!
EDIT: CODE REMOVED
Hmm, I'm not quite sure what you mean.
I need the mouse listener to call the enter() method for the specific Square object that has called it :/
I've worked out I need the row and column of the square the mouse is on (using e.getX() and e.getY() somehow?) and then I can just call the enter() method.
ie. squares[1][2].enter() changes the...
EDIT: Code Removed
EDIT: CODE REMOVED