Last active
December 11, 2015 19:38
-
-
Save biwakonbu/4649517 to your computer and use it in GitHub Desktop.
Java で Window 生成する方法(というかソース) ref: http://qiita.com/items/f37fe7f29d763951e51a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.eclipse.swt.widgets.Display; | |
import org.eclipse.swt.widgets.Shell; | |
public class HelloWorldSWT { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO 自動生成されたメソッド・スタブ | |
Display display = new Display(); | |
Shell shell = new Shell(display); | |
shell.setText("Hello world"); | |
shell.open(); | |
while (!shell.isDisposed()) { | |
if (!display.readAndDispatch()) | |
display.sleep(); | |
} | |
display.dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment