row.jvt

来自「SWT_designer安装软件」· JVT 代码 · 共 53 行

JVT
53
字号
import
org.eclipse.swt.SWT
org.eclipse.swt.layout.FillLayout
org.eclipse.swt.layout.RowLayout
org.eclipse.swt.widgets.Button
org.eclipse.swt.widgets.Display
org.eclipse.swt.widgets.Group
org.eclipse.swt.widgets.Label
org.eclipse.swt.widgets.Shell

method
	public static void main(String[] args) {
		final Display display = new Display();
		final Shell shell = new Shell();
		shell.setLayout(new RowLayout(SWT.HORIZONTAL));
		shell.setText("RowLayout test");
		{
			final Button button = new Button(shell, SWT.NONE);
			button.setText("button");
		}
		{
			final Button button = new Button(shell, SWT.NONE);
			button.setText("button with long caption");
		}
		{
			final Group group = new Group(shell, SWT.NONE);
			group.setLayout(new FillLayout(SWT.VERTICAL));
			group.setText("Group");
			{
				final Button button = new Button(group, SWT.NONE);
				button.setText("long long long button");
			}
			{
				final Button button = new Button(group, SWT.NONE);
				button.setText("button");
			}
			{
				final Button button = new Button(group, SWT.NONE);
				button.setText("button");
			}
		}
		{
			final Label label = new Label(shell, SWT.NONE);
			label.setText("label");
		}
		shell.open();
		shell.layout();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?