wood burning stoves*
The moose likes Applets and the fly likes JDialog with JApplet parent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "JDialog with JApplet parent" Watch "JDialog with JApplet parent" New topic
Author

JDialog with JApplet parent

Nigel Patching
Greenhorn

Joined: Jun 15, 2001
Posts: 7
Hi,
I want to have a JDialog appear in an JApplet, but have the JApplet as the parent frame to the JDialog.
Unfortunately JApplet is a super class to Frame / JFrame. I've tried casting it to Frame but (predictably) this gave me a runtime error.
Of course I could have no parent for the JDialog, but I would prefer the functionality you get when the JDialog has a parent.
Anyone got any ideas how I can do this?
Thanks,
NIgel
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Nigel,
I would create a frame but don't make it visible and use as the parent of the dialog.

Regards,
Manfred.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDialog with JApplet parent