Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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