Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Adelina Fischer   on Nov 02 In Java Category.

  
Question Answered By: Dustin Dean   on Nov 02

How about changing the actionPerformed code...

public void  actionPerformed(ActionEvent ae) {
JButton btn = (JButton) ae.getSource();

if (btn == cnbutton) {
....
} else if (btn == okbutton) {
...
}
}

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on java.awt.ActionEvent problem Or get search suggestion and latest updates.


Tagged: