Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Pazderski2019-06-03 17:23:29 -0400
committerEric Williams2019-06-05 14:39:32 -0400
commit35ff15b051926ac9eae77a05c9af93019bda2686 (patch)
treefd6c1dec7963aa8972a6ae667d5b4e489609fe31
parent497b02a9d8d940b9bdd51289ed7cf5eba9c12615 (diff)
downloadeclipse.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>
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet25.java4
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 ();

Back to the top