Mercurial > projects > dwt2
comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.d @ 29:4e5843b771cc
First snippets buildable on windows
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 22 Mar 2009 19:55:00 +0100 |
parents | 69b1fa94a4a8 |
children | 9f4c18c268b2 |
comparison
equal
deleted
inserted
replaced
28:69b1fa94a4a8 | 29:4e5843b771cc |
---|---|
19 * http://www.eclipse.org/swt/snippets/ | 19 * http://www.eclipse.org/swt/snippets/ |
20 * | 20 * |
21 * @since 3.0 | 21 * @since 3.0 |
22 */ | 22 */ |
23 import org.eclipse.swt.SWT; | 23 import org.eclipse.swt.SWT; |
24 import org.eclipse.swt.DWTError; | 24 import org.eclipse.swt.SWTError; |
25 import org.eclipse.swt.DWTException; | 25 import org.eclipse.swt.SWTException; |
26 | 26 |
27 import org.eclipse.swt.browser.Browser; | 27 import org.eclipse.swt.browser.Browser; |
28 import org.eclipse.swt.widgets.Display; | 28 import org.eclipse.swt.widgets.Display; |
29 import org.eclipse.swt.widgets.Shell; | 29 import org.eclipse.swt.widgets.Shell; |
30 import org.eclipse.swt.layout.FillLayout; | 30 import org.eclipse.swt.layout.FillLayout; |
50 Shell shell = new Shell(display); | 50 Shell shell = new Shell(display); |
51 shell.setLayout(new FillLayout()); | 51 shell.setLayout(new FillLayout()); |
52 Browser browser; | 52 Browser browser; |
53 try { | 53 try { |
54 browser = new Browser(shell, SWT.NONE); | 54 browser = new Browser(shell, SWT.NONE); |
55 } catch (DWTError e) { | 55 } catch (SWTError e) { |
56 Cout("Could not instatiate Browser.").newline; | 56 Cout("Could not instatiate Browser.").newline; |
57 return; | 57 return; |
58 } | 58 } |
59 browser.setText(html); | 59 browser.setText(html); |
60 shell.open(); | 60 shell.open(); |