import org.eclipse.swt.*; import org.eclipse.swt.browser.Browser; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class SampleProgram { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); GridLayout layout = new GridLayout(2, false); shell.setLayout(layout); Text t = new Text(shell, SWT.NONE); t.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, true, 1, 1)); t.setText("Text 1"); t = new Text(shell, SWT.NONE); t.setText("Text 2"); t.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, true, 1, 1)); Browser b = new Browser(shell, SWT.NONE); String html = ""+ ""+ "HTML Test"+ "local link"; b.setText(html); b.setLayoutData(new GridData(SWT.LEFT, SWT.FILL,true, true, 2, 2)); t = new Text(shell, SWT.NONE); t.setText("Text 3"); t.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, true, 1, 1)); t = new Text(shell, SWT.NONE); t.setText("Text 4"); t.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, true, true, 1, 1)); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } }