Hi all,
I'm a newbie for SWT, all was fine until now.
I got a simple app with some buttons and text fields. I'd like to update the text field with incoming messages and show it to the user.
Display display = new Display();
Shell shell = new Shell(display);
messageField = new Text (shell, SWT.BORDER);
messageField.setBounds(10, 100, 150, 100);
messageField.setEditable(false);
messageField.append("1st");
shell.setBounds(10, 10, 600, 1400);
shell.pack ();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
messageField.append("2nd");
Now, I can see "1st" but not "2nd" because it's called after the display.dispose ();
OK, but how can I update a text field after the app is shown on the screen?
Thanks in advance