This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Convert JApplet to application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Convert JApplet to application" Watch "Convert JApplet to application" New topic

Convert JApplet to application

maja neskovic
Ranch Hand

Joined: Apr 28, 2010
Posts: 134
I have made one JApplet and I would like to change it to application. I tried to do like on this url: Applet to Application but then I get errors because it doesn't recognize methods such as getContentPane(since I generated part of code from JApplet Form). Can anybody, please, explain me how to solve this?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
the easy way is to have your code in a class that uses a JPanel.
you then add that panel to your applet

to make it into an app, simplyadd the same panel to a JFrame,
adding a few JFrame bits - defaultClose/size/location/visible etc
I agree. Here's the link:
subject: Convert JApplet to application
It's not a secret anymore!