Mercurial > projects > dwt-samples
diff snippets/button/Snippet206.d @ 117:8cdaac0dc743
Added more snippets from TomD
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 12 Jul 2008 20:09:06 +0200 |
parents | 0de3dab4d6e1 |
children |
line wrap: on
line diff
--- a/snippets/button/Snippet206.d Sat Jul 12 17:54:42 2008 +0200 +++ b/snippets/button/Snippet206.d Sat Jul 12 20:09:06 2008 +0200 @@ -20,7 +20,6 @@ * * @since 3.2 */ -/* Port OK */ import dwt.DWT; import dwt.graphics.Image; @@ -32,23 +31,23 @@ import dwt.dwthelper.utils; void main(String[] args){ - Snippet206.main(args); + Snippet206.main(args); } public class Snippet206 { - public static void main(String[] args) { - Display display = new Display(); - Image image = display.getSystemImage(DWT.ICON_QUESTION); - Shell shell = new Shell(display); - shell.setLayout (new GridLayout()); - Button button = new Button(shell, DWT.PUSH); - button.setImage(image); - button.setText("Button"); - shell.setSize(300, 300); - shell.open(); - while (!shell.isDisposed ()) { - if (!display.readAndDispatch ()) display.sleep (); + public static void main(String[] args) { + Display display = new Display(); + Image image = display.getSystemImage(DWT.ICON_QUESTION); + Shell shell = new Shell(display); + shell.setLayout (new GridLayout()); + Button button = new Button(shell, DWT.PUSH); + button.setImage(image); + button.setText("Button"); + shell.setSize(300, 300); + shell.open(); + while (!shell.isDisposed ()) { + if (!display.readAndDispatch ()) display.sleep (); + } + display.dispose (); } - display.dispose (); - } -} \ No newline at end of file +}