posted 20 years ago
3 problems to fix and the code should work.
You never impplement ActionListener on SimpleTable. Put a comma after ListSelectionListener and add ActionListener eatMe method does not need to be static. Remove static from that method. In the eatMe method you create a new JButton then in the actionPerformed method you try and modify that object's text. The scope of button is only for the eatMe method. You can either make button global to the entire class or you can do something like the code below
Hope that helps. Here is your code with the solutions I mentioned.