java2s.com | © Demo Source and Support. All rights reserved.
Add a different ActionListener to each button. Better yet, use an Action instead of an ActionListener. An Action is just a fancy ActionListener that has a few more properties. Read the section from the Swing tutorial on How to Use Action for examples of d
Java JButton in Swing. Java JButton in swing is used for performing action when clicked on it. This action might be getting data from input field, saving or retrieving data to database or performing and displaying calculation result in swing frame. Follow
Post a Comment:
Showing 0 Comments: