| [news.eclipse.technology.albireo] Re: Will there be a fix for ... |
I just wrote a seperate program to test if the error was still happening and it is.
Here is exactly what i'm doing.
1)Create a Shell, set layout etc
2)Try JOptionPane.showInputDialog (works fine)
3)Create swing component (a piccolo "canvas", which is an extended JComponent)
4)Add my EmbeddedSwingComposite
5)Let the GUI load
6)Click on "file" menu and click on an item I have preset with an action lisener to call a function that loads another JOptionPane.showInputDialog
The result is the first JoptionPane is fine, but the second one freezes the entire program as soon as I click a button.
If you would like, I could upload the project so you can try it. It's just one file along with the folder with all the swing integration stuff from Gordon's example.
James Peltzer wrote:You may need to provide a little more information. I know that I have successfully used JOptionPane and JDialogs both before and after creating EmbeddedSwingComposites. The code I am working from is modified from Gordon's original article code.
Originally I was often having this problem when an invisible dialog was
added to the SwtInputBlocker... but I believe the fix for that one has since
been applied to the sample code.
I would also suspect that you are getting pop-under windows (your swing
window could be trapped behind your SWT Window) but it is hard to say. You
could also try the changes Gordon and I discuss in the September 19th post
to this group.
In short, I would hazard a guess that compatibility issues such as this are
vital to the project and will eventually be worked out.
-James
"Cklewis" <chriskwonlewis@xxxxxxx> wrote in message news:fgg8p4$5ko$1@xxxxxxxxxxxxxxxxxxxxWill there be a fix for letting you use JOptionPane and JDialogs(etc) ?
I noticed if I use JOptionPane BEFORE creating my EmbeddedSwingComposite it works just fine. But if I attempt to use JOptionPane or a JDialog after I've created the EmbeddedSwingComposite that it will display, but it tends to freeze the whole program.
Not sure if you were aware of this problem, but it would be nice to be able to use JOptionPane, and in my case a JDialog since the person before me wrote a lot of code for that particular section which uses a JDialog and JTrees. Initially i thought the problem was setting the JDialog's frame owner to the awt frame in EmbeddedSwingComposite. But I experimented with a regular JOptionPane(doesn't ask for the parent component/frame) and noticed the same problem.