java jpanel set background color

Solutions on MaxInterview for java jpanel set background color by the best coders in the world

showing results for - "java jpanel set background color"
Regina
01 Aug 2020
1import javax.swing.JPanel;
2import java.awt.Color;
3
4JPanel panel = new JPanel();
5panel.setBackground(Color.green);
6//To know all the colors, check this link:
7//https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html