To change the background color of a JButton, you can use setBackground()
method, passing a java.awt.Color.
From the docs, for setBackground()
:
Sets the background color of this component. The background color is used only if the component is opaque, and only by subclasses of JComponent or ComponentUI implementations. Direct subclasses of JComponent must override paintComponent to honor this property.
Example:
btnAdmin.setBackground(Color.BLUE);