Reply
Old 06-25-2014, 02:06 AM   #1 (permalink)
 
Status: Junior Member
Posts: 12



Default java button

Well, i am interest of learning programming.
I know how to make a window with a button, that when i click the button it opens a new window.

How can i make "if button = true then label change the text?"(of course this is wrong)?



How can i make it when i click the button to change the label???
EpicBloxCGr is offline   Reply With Quote
Old 06-25-2014, 02:06 AM   #2 (permalink)
Bob
 
Status: Senior Member
Posts: 1,370



Default java button

Inside the ActionPerformed method for the button, simply call setText() for the label whose text you want to change.
Bob is offline   Reply With Quote
more..

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Button AWT help Please? Aaron Coding 0 06-05-2014 10:06 AM
java code help for a button? Ryan Coding 1 07-11-2013 10:06 AM
Java GUI "OK" button? CountOrad Programming 1 04-26-2013 06:06 AM
Java: How to remove a button when the button is clicked? Unknown_User Programming 1 03-02-2012 06:09 AM
Java button, variable help?!?!? Unknown_User Coding 2 02-29-2012 06:09 AM