20d49371a33d001d192abbead0da6110

来自「动态演绎2叉树的原理。演示二叉树的前序遍历过程。 演示二叉树的中序遍历过程。 」· 代码 · 共 58 行

TXT
58
字号
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("Welcome to BinaryTree Demonstration Program");
		//

		shell.open();

		final Button button = new Button(shell, SWT.NONE);
		button.addSelectionListener(new SelectionAdapter() {
			@SuppressWarnings("static-access")
			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 + =
减小字号Ctrl + -
显示快捷键?