SampleShell.java
Click here to get the file
サイズ
1 kB
-
File type
text/x-java
ファイルのコンテンツ
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class SampleShell {
public static void main(String[] args) {
// ディスプレイ生成
Display display = new Display();
// フレーム生成
Shell shell = new Shell(display);
// フレームのサイズ
shell.setSize(200, 150);
// フレームのタイトル
shell.setText("フレーム");
// フレームを表示
shell.open();
// フレームを閉じるまでディスプレイを終了しない.
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}