import org.eclipse.swt.*; import org.eclipse.swt.custom.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class TextTest { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); shell.setText("Press Ctrl+Cmd+Space for Emojis"); new Text(shell, SWT.BORDER | SWT.MULTI); new StyledText(shell, SWT.BORDER | SWT.MULTI); shell.setSize(400, 200); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } }