?? testdialog.java
字號:
import java.awt.*;
import java.awt.event.*;
/**
* 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 TestDialog
{
Frame f = new Frame("測試");
Dialog d1 = new Dialog(f, "模式對話框" , true);
Dialog d2 = new Dialog(f, "非模式對話框" , false);
Button b1 = new Button("打開模式對話框");
Button b2 = new Button("打開非模式對話框");
public void init()
{
d1.setBounds(20 , 30 , 300, 400);
d2.setBounds(20 , 30 , 300, 400);
b1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
d1.setVisible(true);
}
});
b2.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
d2.setVisible(true);
}
});
f.add(b1);
f.add(b2 , BorderLayout.SOUTH);
f.pack();
f.setVisible(true);
}
public static void main(String[] args)
{
new TestDialog().init();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -