summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSteve Northover <steve>2008-02-06 21:04:07 +0000
committerSteve Northover <steve>2008-02-06 21:04:07 +0000
commitdc11297cfc699158886ce78f3a3832c47bf66559 (patch)
tree2bf3fcc2a4414dd6eab0800cca8baa111c279c4f /examples
parent7ddfed07c906ad1c848732e3e8e47aff42496157 (diff)
downloadeclipse.platform.swt-dc11297cfc699158886ce78f3a3832c47bf66559.tar.gz
eclipse.platform.swt-dc11297cfc699158886ce78f3a3832c47bf66559.tar.xz
eclipse.platform.swt-dc11297cfc699158886ce78f3a3832c47bf66559.zip
*** empty log message ***
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java
index aa75aba8ab..fc6ba89814 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet291.java
@@ -22,16 +22,11 @@ import org.eclipse.swt.layout.*;
import org.eclipse.swt.accessibility.*;
public class Snippet291 {
- static Display display;
- static Shell shell;
- static Tree tree;
-
public static void main(String[] args) {
- display = new Display();
- shell = new Shell(display);
+ final Display display = new Display();
+ Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
-
- tree = new Tree(shell, SWT.BORDER);
+ final Tree tree = new Tree(shell, SWT.BORDER);
for (int i = 0; i < 5; i++) {
TreeItem treeItem = new TreeItem (tree, SWT.NULL);
treeItem.setText ("item" + i);
@@ -52,7 +47,6 @@ public class Snippet291 {
}
}
});
-
shell.pack();
shell.open();
while (!shell.isDisposed()) {