📄 10f54576a43d001d192abbead0da6110
字号:
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
//Jul 2, 20074:39:11 PM
public class BinaryTreeDemonstration
{
/**
* Launch the application
* @param args
*/
public static void main(String[] args)
{
final Display display = Display.getDefault();
final Shell shell = new Shell(SWT.MIN | SWT.CLOSE | SWT.BORDER);
shell.setSize(423, 82);
shell.setText("欢迎你来观看二叉树遍历演示程序");
//
shell.open();
final Button button = new Button(shell, SWT.NONE);
button.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e)
{
shell.dispose();
CreateBT BT =null;
BT.main();
}
});
button.setText("Create A BinaryTree");
button.setBounds(29, 9, 163, 31);
final Button button_1 = new Button(shell, SWT.NONE);
button_1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e)
{
System.exit(0);
}
});
button_1.setText("Exit");
button_1.setBounds(221, 9, 163, 31);
shell.layout();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -