This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JFrame with JApplet  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am coding a large app. in Swing that must both run as a standalone app and as an applet.
For this reason, I wanted to extend JApplet but have a JFrame for all of the content.
Has anyone done this before?
Is it even possible to have a JFrame in a JApplet?
Is there a better way to go about this?
Thanks for your help
 
devara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai sfrench,
If you want to run as standalone application you can create instance of Applet and pass that instance to Frame and add it at Center set the layout of frame as Border Layout then you run frame as it is by this applet will be running along with frame.
Originally posted by sfrench:
I am coding a large app. in Swing that must both run as a standalone app and as an applet.
For this reason, I wanted to extend JApplet but have a JFrame for all of the content.
Has anyone done this before?
Is it even possible to have a JFrame in a JApplet?
Is there a better way to go about this?
Thanks for your help

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!