954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Java - Adding actions to Box Layout buttons

Hello everyone!
My name is Uriel, and I'm from the Philippines.

I'm currently doing our machine problem in Java. I'm using the BoxLayout for this GUI.

akong java gui.jpg

I can't seem to find the correct set of codes to make these buttons function. What codes do I use for these buttons in order for them to function?

Thanks a lot guys...

Uriel

Attachments akong_java_gui.jpg 28.03KB
Yuri_0129
Newbie Poster
3 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

Making the buttons work has nothing to do with which LayoutManager you use. Regardless of layout you use an ActionListener to make a method that will execute when the button is clicked. Google ActionListener for loads and loads of examples of how to set this up.

JamesCherrill
Posting Genius
Moderator
6,370 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 
Making the buttons work has nothing to do with which LayoutManager you use. Regardless of layout you use an ActionListener to make a method that will execute when the button is clicked. Google ActionListener for loads and loads of examples of how to set this up.

Thanks for the tip...

Yuri_0129
Newbie Poster
3 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: