File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SWT window freezes swing windows

 
Liwuen Chew
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone!
Right now I'm facing with a "swing freeze" problem. I have two forms, one made using swing and the second using SWT. If I call the SWT one from the swing one, everything in the swing one freeze until the SWT form is closed.
Well, I have a Jmenu which lets me access to the SWT form. If I click the option, the menu freeze still open (and the whole form also freeze) and the SWT form is open. If I close the SWT one, everything comes back again to normal in the swing world.

I have something like this in the swing window


which opens the SWT form. Am I doing something wrong? Thanks!
 
Liwuen Chew
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey that was easy!
Only made a thread and make your SWT application to implement Runnable and that's it!

It would be something like

a) In the SWT form:


b) When you call it:


With these two items, you can use both the SWT and swing forms at the same time!

Hope this helps everyone with the same issue!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic