Results 1 to 4 of 4
- 11-03-2009, 05:44 PM #1
How can I display on Button click?
I am working with NetBeans IDE6.7.1. am developing guitar programme. Now i want the user to be able to mute some string by clicking a button on top of the string.
How can I hide label (Mute) and display it when the user clicks on the button?
Thanks for your help ... :confused:
- 11-03-2009, 06:20 PM #2
Hide the label or hide the button? Hiding the label can be done by just setting the label to a blank string "" and then set it back to "Mute" whenever some listener is called.
To hide the button I believe there's a setVisible() method attached to buttons you can use. You need a listener to call this function attached to your button and you're going to need to refresh the screen afterwards.Liberty has never come from the government.
Liberty has always come from the subjects of government.
The history of liberty is the history of resistance.
The history of liberty is a history of the limitation of governmental power, not the increase of it.
- 11-03-2009, 07:05 PM #3
Thanks xcallmejudasx for your prompt response,
I've done that and it worked perfectly, splendid.
But i now realize that i am using JToggleButton to show and hide the "Mute".
What i actually want is
If the JToggleButton is clicked (down), it shows Mute & if clicked (up) again, it hide the Mute text.
Plz how can i achieve that.
once again lotta tnx
- By ramsrocker in forum New To JavaReplies: 10Last Post: 02-15-2009, 06:52 AM
- By mandyj in forum New To JavaReplies: 8Last Post: 12-29-2008, 07:12 AM
- By mandragora in forum AWT / SwingReplies: 11Last Post: 11-10-2008, 11:06 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 03-11-2008, 11:02 PM
- By eva in forum AWT / SwingReplies: 2Last Post: 01-16-2008, 12:27 AM