View Single Post
  #1 (permalink)  
Old 08-04-2007, 11:05 PM
baltimore baltimore is offline
Member
 
Join Date: Jul 2007
Posts: 40
baltimore is on a distinguished road
Help with Handler
Hi, My question is if I have two buttons:
Code:
JButton buttonOne = new JButton("ADD"); buttonOne.addActionListener(this); JButton two = new JButton("ADD"); buttonTwo.addActionListener(this);
How do I make it so that the add button associates with buttonOne does one thing and the add button associates with buttonTwo does another thing?
I have tried the following but both buttons does the same thing when I click on it:

Code:
e.getActionCommand().equals("ADD");
Thanks.
Reply With Quote
Sponsored Links