File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Groovy Fundamentals video training course this week in the Groovy 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:
subject: JDialog with JApplet parent