set the background color of a jpanel in java code example
Example: Java JPanel set background color
import javax.swing.JPanel;
import java.awt.Color;
JPanel panel = new JPanel();
panel.setBackground(Color.green);
//To know all the colors, check this link:
//https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html