application2.jvt
来自「SWT_designer安装软件」· JVT 代码 · 共 39 行
JVT
39 行
import
org.eclipse.swt.SWT
org.eclipse.swt.widgets.Display
org.eclipse.swt.widgets.Shell
method
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
try {
%TypeName% window = new %TypeName%();
window.open();
} catch (Exception e) {
e.printStackTrace();
}
}
method
/**
* Open the window
*/
public void open() {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setSize(%DefaultFormSize%);
shell.setText("SWT Application");
%SWTLocalShellLayout%
shell.open();
shell.layout();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?