📄 test.java
字号:
import java.awt.*;
import javax.swing.*;
public class Test extends JApplet {
ColorIcon redIcon = new ColorIcon(Color.red, 40, 15),
blueIcon = new ColorIcon(Color.blue, 40, 15),
yellowIcon = new ColorIcon(Color.yellow, 40, 15);
public void init() {
JMenuBar mb = new JMenuBar();
JMenu colors = new JMenu("Colors");
colors.add(new JMenuItem(redIcon));
colors.add(new JMenuItem(blueIcon));
colors.add(new JMenuItem(yellowIcon));
mb.add(colors);
setJMenuBar(mb);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -