Can you explain what "doesn't work" means? Is the method called? Add a println() statement that prints out the value returned by the getSource() method to see what component is causing the event and...
Type: Posts; User: Norm
Can you explain what "doesn't work" means? Is the method called? Add a println() statement that prints out the value returned by the getSource() method to see what component is causing the event and...
final means the variable's value can't be changed. The contents of the object can be changed.
You need an action listener. See the tutorial: How to Write an Action Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)