diff options
author | Paul Pazderski | 2019-06-03 21:23:29 +0000 |
---|---|---|
committer | Eric Williams | 2019-06-05 18:39:32 +0000 |
commit | 35ff15b051926ac9eae77a05c9af93019bda2686 (patch) | |
tree | fd6c1dec7963aa8972a6ae667d5b4e489609fe31 /examples | |
parent | 497b02a9d8d940b9bdd51289ed7cf5eba9c12615 (diff) | |
download | eclipse.platform.swt-35ff15b051926ac9eae77a05c9af93019bda2686.tar.gz eclipse.platform.swt-35ff15b051926ac9eae77a05c9af93019bda2686.tar.xz eclipse.platform.swt-35ff15b051926ac9eae77a05c9af93019bda2686.zip |
Bug 547938 - [Snippets] Use empty Shell for Snippet explanation
Change-Id: I7d0b4ad70fff72798213ad570f06785e1d49e73c
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java index 0f484899be..8ab9df86c9 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java @@ -22,6 +22,7 @@ package org.eclipse.swt.snippets; * @since 3.0 */ import org.eclipse.swt.*; +import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class Snippet25 { @@ -143,7 +144,10 @@ public static void main (String [] args) { }; shell.addListener (SWT.KeyDown, listener); shell.addListener (SWT.KeyUp, listener); + shell.setLayout(new FillLayout()); shell.setSize (200, 200); + Label label = new Label(shell, SWT.WRAP); + label.setText("Start typing to see key state, code and character in console."); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); |