How to change the look of a disabled JButton in java?

If you are talking about the text, then you might be able to use the UIManager to change the disabled foreground color. Check out the UIManager Defaults.

You'll want to modify the Look and Feel you are using. There are tons available for download and you can of course make your own.

You can add HTML coding to your button which gives a large range of flexibility, even to disabled buttons. Example: button. SetText("3").

Since you didn't format your code, the html was invisible. Please use the preview before submitting answers, and inform yourself about how to format your posts. Thank you.

– user unknown Sep 5 at 23:43.

You can also set a disable icon with JButton.setDisableIcon().

I am not 100% on this, but I think you can overwrite the paint method of the button's glasspane to overlay it with the color of your choice. Here is a tutorial on the panes of a container: java.sun.com/docs/books/tutorial/uiswing....

Individual components don't have a glasspane. The glasspane is for the entire frame. – camickr Oct 19 '09 at 20:21.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions