I am developing a Java Desktop Application. In it I have 4 JButtons
on a JPanel
. Now I want that whenever a button is clicked its background color
Here's a cross-section of "Button.background" based on this example:
*** Metal javax.swing.plaf.metal.MetalLookAndFeel 636 entries Button.background: javax.swing.plaf.ColorUIResource[r=238,g=238,b=238] *** Nimbus com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel 1052 entries Button.background: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel$NimbusProperty@60961dff *** CDE/Motif com.sun.java.swing.plaf.motif.MotifLookAndFeel 550 entries Button.background: javax.swing.plaf.ColorUIResource[r=174,g=178,b=195] *** Mac OS X com.apple.laf.AquaLookAndFeel 705 entries Button.background: com.apple.laf.AquaNativeResources$CColorPaintUIResource[r=238,g=238,b=238]