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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "JDialog with JApplet parent" Watch "JDialog with JApplet parent" New topic

JDialog with JApplet parent

Nigel Patching

Joined: Jun 15, 2001
Posts: 7
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?
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.

I agree. Here's the link: http://aspose.com/file-tools
subject: JDialog with JApplet parent
It's not a secret anymore!