View Single Post
  #3 (permalink)  
Old 07-04-2007, 08:16 AM
Albert Albert is offline
Senior Member
 
Join Date: Jun 2007
Posts: 114
Albert is on a distinguished road
The other style that Eric mentions would look like this, either gets the job done so it's really just a matter of preference:

Code:
public class Example implements ActionListener { public Example() { JButton button = new JButton( "Example" ); button.addActionListener( this ); } public void actionPerformed( ActionEvent event ) { JOptionPane.showMessageDialog( null, "This is an example" ) ; } }
Greetings

Albert
Reply With Quote