📄 verticalsash.java
字号:
package com.swtSample.advancedControl;
import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
/**
* This class displays a vertical sash
*/
public class VerticalSash {
public static void main(String[] args) {
new VerticalSash().run();
}
public void run() {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Vertical Sash");
shell.setLayout(new FillLayout());
Sash sash = new Sash(shell, SWT.VERTICAL);
new Composite(shell, SWT.NONE);
new Composite(shell, SWT.NONE);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -