📄 grid.java
字号:
//Copyright (c) 1998, Arthur Gittleman
//This example is provided WITHOUT ANY WARRANTY either expressed or implied.
/* Adds six buttons to illustrate the use
* of the grid layout. The buttons do not
* do anything
*/
import java.awt.*;
import java.applet.Applet;
public class Grid extends Applet {
public void init() {
setLayout(new GridLayout(2,3));
for (int i=0; i<6; i++)
add(new Button(String.valueOf(i)));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -