📄 panelexample.java
字号:
import java.applet.*;
import java.awt.*;
public class PanelExample
extends Applet
{
public void init()
{
Panel buttons = new Panel();
buttons.setLayout(new FlowLayout());
buttons.add(new Button("Okay"));
buttons.add(new Button("Cancel"));
Panel textGrid = new Panel();
textGrid.setLayout(new GridLayout(2, 2));
for (int i = 0; i < 4; i++)
{
textGrid.add(new TextField(4));
}
setLayout(new BorderLayout());
add("North", buttons);
add("Center", textGrid);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -