Applellial Posted June 10, 2011 Share Posted June 10, 2011 I am relatively new to GUI programming and when I have multiple buttons in the same class I usually use if statements using getSource() in order to see what button is referencing the action listener and then delegate specifics on what to do. Is there a way I can set individual action listeners to each button or is the most efficient way to use getSource Quote Link to comment https://forums.phpfreaks.com/topic/238947-multiple-buttons-to-same-action-listener/ Share on other sites More sharing options...
Adam Posted June 10, 2011 Share Posted June 10, 2011 Java != JavaScript Quote Link to comment https://forums.phpfreaks.com/topic/238947-multiple-buttons-to-same-action-listener/#findComment-1227836 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.