📜  Java JPanel 设置背景颜色 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:29.713000             🧑  作者: Mango

代码示例1
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