jeni
Remember that java matches on object references so the reference to doneButton should be the name you gave to the button object when you made it.
Not really. There are two ways of doing this:
JButton doneButton = new JButton("Done");
if (ae.getSource() == doneButton)
{
}
or
if (ae.getActionCommand().equals("Done"))
{
}
You can compare the actual object itself, or the name of it.
Reputation Points: 113
Solved Threads: 19
Postaholic
Offline 2,108 posts
since Jun 2004