?? testboxlayout.java
字號(hào):
import java.awt.*;
import javax.swing.*;
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestBoxLayout
{
private Frame f = new Frame("測試");
public void init()
{
f.setLayout(new BoxLayout(f , BoxLayout.Y_AXIS));
f.add(new Button("第一個(gè)按鈕"));
f.add(new Button("按鈕二"));
f.pack();
f.setVisible(true);
}
public static void main(String[] args)
{
new TestBoxLayout().init();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -