Java by API/org.eclipse.jface.window/Window
Window: setBlockOnOpen(boolean arg0)
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.ruposite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
public class MainClass extends ApplicationWindow {
public MainClass() {
super(null);
}
public void run() {
setBlockOnOpen(true);
open();
Display.getCurrent().dispose();
}
protected Control createContents(Composite parent) {
Label label = new Label(parent, SWT.CENTER);
label.setText("Hello, World");
return label;
}
public static void main(String[] args) {
new MainClass().run();
}
}