Click to See Complete Forum and Search --> : [RESOLVED] Color of button while clicked ?


smifens
November 10th, 2009, 02:42 PM
First of all, HI.

I'd doing a Tic-tac-toe game as a side project. The playing area is a 3x3 grid on buttons. I have removed most of the visual eye-candy that buttons have, like borders and painted focus, etc. I would also like to remove the following feature also.

When you press the button and keep the button pressed, it changes color. I would like it to be white or no enabled at all but I don not know how to do that.

This is what I mean, http://imgur.com/L8Jgy.png

Any suggestions ?

smifens
November 11th, 2009, 03:58 AM
Ah, I found what I needed.

<code>UIManager.getDefaults().put("Button.select", Color.white);</code>