GeeCON Prague 2014*
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


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Convert JApplet to application" Watch "Convert JApplet to application" New topic
Author

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
 
GeeCON Prague 2014
 
subject: Convert JApplet to application