Reputation: 2840
So far I've only seen ways to convert Java desktop applications to applets. Is there any way to do the reverse? (it inherits from java.applet.Applet
)
Edit: What I meant was to somehow make an applet a desktop executable JAR file (swing or something).
Upvotes: 1
Views: 4862
Reputation: 347184
Without any (example) code it's difficult to pin point an example.
However, the general approach is to contain all your application logic and GUI code in a separate package/classes. By containing your basic UI in something like a JPanel, you can chose where to place it.
This not only means you can switch it out into a JApplet
or JFrame
, but also include it as part of a compound UI as required
This is one of the reason why we suggest not adding/building your UI directly on top of a top level container
Upvotes: 1
Reputation: 171
The easiest way would be to run it in some sort of AppletViewer
http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/appletviewer.html
Here is a similar question.
Hope it helps.
Failing which you will need to re-base the code on JFrame and java Swing
Upvotes: 1