• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFrames Within Applets/JApplets  RSS feed

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!