Community
Participate
Working Groups
If AWT modal dialog is showing up and at the same time is created view or editor with have embedded swing panel, then after closing dialog, this embedded panel can't receive event.
Please provide a small stand alone example that shows the problem and include the JDK version information. Thanks.
Created attachment 36041 [details] Plugin project for eclipse Here is plugin created on top of "Sample view" plugin. Open view from the Views-> Sample Category. Press Test button which shows modal dialog with button "NEW". Pressing "NEW" button will create secondary view with button "Test". Close dialog. Secondary view is not responsive.
Forgot to mention - OS is Windows 2000 and Java is 1.5.0_06, however such behavior I got with Java 1.4.3 also
Just want to know if you have reproduced this problem? It is one of the major stopper for my integration and any workaround are welcome.
I was able to reproduce it, but I still do not know what is the problem...
This looks like an AWT bug. The second EmbeddedFrame (created after the dialog is up) is not re-enabled after the dialog is hidden. Oleg, could you confirm if this is really a bug in AWT and if there is any work around? Here is a standalone app (no Eclipse) that reproduces the problem. import java.awt.BorderLayout; import java.awt.event.*; import javax.swing.*; import org.eclipse.swt.*; import org.eclipse.swt.awt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class PR131093 { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Composite comp = new Composite(shell, SWT.EMBEDDED); final java.awt.Frame f1 = SWT_AWT.new_Frame(comp); JButton comp1 = new JButton("BUTTON"); comp1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JDialog dlg= new JDialog((java.awt.Frame)null, "Gaidena", true); dlg.setLayout(new BorderLayout()); JButton comp = new JButton("NEW"); comp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { display.asyncExec(new Runnable() { public void run () { final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); Composite comp = new Composite(shell, SWT.EMBEDDED); java.awt.Frame f1 = SWT_AWT.new_Frame(comp); JButton comp1 = new JButton("BUTTON"); f1.add(comp1); shell.setBounds(50, 250, 200, 100); shell.open(); } }); } }); dlg.add(BorderLayout.CENTER, comp); dlg.pack(); dlg.setVisible(true); // java.awt.Frame[] frames = java.awt.Frame.getFrames(); // for (int i = 0; i < frames.length; i++) { // System.out.println("frame=" + frames[i] + " " + frames[i].isEnabled()); // } } }); f1.add(comp1); shell.setBounds(50, 50, 200, 100); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } } }
Is any workaround for this problem?
I was able to reproduce the problem (btw it is not reproducible with current builds of 6.0) I do not know the cause of this problem yet (need perform more investigation). As soon as I will have more information I will post it.
It looks like that this is the same as Sun's bug #6417395 (New IE applet window becomes unresponsive if it is launched after the modal dialog)
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. If you have further information on the current state of the bug, please add it. 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.