Community
Participate
Working Groups
I wanted to embed brower into awt canvas.I wrote public class MyBrowser{ public static void main(String[] args) { final Display display = Display.getDefault(); Frame frm = new Frame("MyBrowser"); Canvas embedded = new Canvas(); frm.add(embedded, BorderLayout.CENTER); frm.pack(); final Shell composite = SWT_AWT.new_Shell(display, embedded); composite.setLayout(new FillLayout(SWT.VERTICAL)); final Browser browser = installBrowser(composite, "http://www.baidu.com"); frm.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { e.getWindow().dispose(); //composite.dispose(); // display.dispose(); } }); JTextField addr = new JTextField(80); addr.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { display.syncExec(new Runnable() { public void run() { browser.setUrl(((JTextComponent) e.getSource()).getText()); } }); } }); frm.add(addr, BorderLayout.NORTH); frm.setSize(800, 600); frm.setVisible(true); while (frm.isDisplayable()) if (!display.readAndDispatch()) display.sleep(); // display.dispose(); } public static Browser installBrowser(Composite parent, String homeURL) { Browser browser = new Browser(parent, SWT.EMBEDDED); browser.setUrl(homeURL); return browser; } } On Windows it works, On Linux, the bridge seems to work, but nothing is visible. So I want to know how to make it work on linux. Just swt browser component is OK.When embed it into awt-canvas. it can not work My environment is :¡¡£í£ï£ú£é£ì£ì£á 1.7.7 gtk: gtk2-2.2.4-19 linux: Red Hat Enterprise Linux ES release 3 (Taroon Update 8) uname -a 2.4.21-47.ELsmp #1 SMP Wed Jul 5 20:38:41 EDT 2006 i686 i686 i386 GNU/Linux
Created attachment 179498 [details] compare window with linux
*** Bug 326254 has been marked as a duplicate of this bug. ***
*** Bug 326255 has been marked as a duplicate of this bug. ***
This bug is still reproducible on 4.7.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.