日期:2014-05-20 浏览次数:20662 次
public static void main(String[] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setLayout (new FillLayout ()); shell.setBounds(100, 100, 810, 600); shell.setMaximized(true); final Browser browser = new Browser(shell, SWT.NONE); browser.setBounds(0, 0, 800, 600); browser.setUrl("http://www.google.com"); browser.setMenu(new Menu(browser)); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); }