GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes Hiding button label when button is disable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Hiding button label when button is disable" Watch "Hiding button label when button is disable" New topic
Author

Hiding button label when button is disable

Saral Saxena
Ranch Hand

Joined: Apr 22, 2011
Posts: 202

Is there any way to hide the label of button in swing when the button is disable..!! please advise..!!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632

set the disabled text color to that of the button's background color
or
set the text to ""
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10426
    
    8

From the UX perspective this does not make sense.
Having a disabled button with the text show tells the user that he can perform this operation, but something is missing.
e.g. Disabled "Save" tells me I can save the changes, but I need to do something else first.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
GeeCON Prague 2014
 
subject: Hiding button label when button is disable