File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes JFrames Within Applets/JApplets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "JFrames Within Applets/JApplets" Watch "JFrames Within Applets/JApplets" New topic

JFrames Within Applets/JApplets

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Hi, I have a class that extends JFrame, and this has components,
which extend JPanels and so on.

I wanted to put my application into an applet.
I know Applet has its own paint() method, but all I want to do is
do this from with the JPanels inside my JFrame.
Can I just put a JFrame into an Applet, without having to change my code?

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
An applet can certainly open a window (which is what JFrame is). It may need to be a JApplet instead of an Applet, I'm not sure.
I agree. Here's the link:
subject: JFrames Within Applets/JApplets
It's not a secret anymore!