Howdy Pardner. You could use getBackground to store the colour of the button before you change it to blue, then use setBackground(storedColor). I thought that there might have been a constant defined somewhere in the swing package for the default colour but I could not find one.
Actually, the background color could change based on the Look and Feel. You can use UIManager.getColor( "Button.background" ) to get the default background color of buttons in the current Look and Feel.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop