views:

1037

answers:

1

I use this : myButton.setBackground(myColor) to change the button background color to my color, how to find it's original default background color so I can change it back ? I know I can save it's default background color before I change and use that, but I wonder if Java stores it some where so maybe I can call something like : myButton.getClass.getDefaultBackground() to get it back ?

+2  A: 

This might help:

http://java.sun.com/j2se/1.5.0/docs/api/java/awt/SystemColor.html

Toolkit.getDesktopProperty(java.lang.String)
Toolkit.getDesktopProperty("control");
// control - The color rendered for the background of control panels and control objects, such as pushbuttons.
mschmidt42