swt練習
import org.eclipse.swt.widgets; object Main { def main(args: Array[String]) { val display = new widgets.Display(); val shell = new widgets.Shell(display); shell.open(); // loop while (!shell.isDisposed()) { if (!display.readAndDispatch()){ display.sleep(); } } display.dispose(); } }
disposeは「始末する」ととると意味がわかる
Display
swtとOSとの接点になるらしい。メインループでeventをdispatchする
memo
tutorial
sample