This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

JFrame with JApplet  RSS feed

 
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
 
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


 
It's a beautiful day in this neighborhood - Fred Rogers. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!