📅  最后修改于: 2022-03-11 14:52:29.713000             🧑  作者: Mango
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