📄 testdrawpanel.java
字号:
import java.awt.Color;
import javax.swing.JFrame;
public class TestDrawPanel {
/** Creates a new instance of TestDrawPanel */
public TestDrawPanel() {
}
public static void main(String args[]){
JFrame frame = new JFrame();
frame.setLayout(null);
frame.setBounds(0,0,500,500);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
DrawPanel d = new DrawPanel();
d.setBounds(0,0,500,500);
d.setVisible(true);
d.setBackground(Color.BLACK);
frame.add(d);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -