Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrames Within Applets/JApplets

 
colin shuker
Ranch Hand
Posts: 750
  • 0
  • 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
Pie
Posts: 42966
73
  • 0
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic