Skip to main content

Converting NetBeans Applications to Applets

2 replies [Last post]
jhipp117
Offline
Joined: 2008-08-24

I like the
lesson from the Java Tutorial which explains how to convert applications to
applets.
Does anyone know of a lesson anywhere which explains how convert a NetBeans
application to an applet, from within NetBeans, or even how to migrate objects
and code developed in a NetBeans desktop application over to a NetBeans web
application?
Many thanks in anticipation.
JHipp

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pkeegan
Offline
Joined: 2005-06-10

Assuming you created the application in NetBeans based on a JFrame (or JPanel, or other non-applet container), you can do the following:

1. Right-click the package containing your app and choose New | Other.
2. Select the Swing GUI Forms category and choose JApplet Form. (This template is one of several applet templates, but this one is the one you want to create a JApplet that you can design in the GUI Builder.)
3. In the editor window, select the tab for the form that you want to convert to an applet.
4. In the Inspector window, select the sub-components of the form and press Ctrl-C (or Ctrl-X) to copy them.
5. In the editor window, select the tab for the JApplet form that you have just created.
6. In the Inspector window, right-click the JApplet node and press Ctrl-V to paste the components.

For info on integrating an applet in a web application in NetBeans, see http://www.netbeans.org/kb/61/web/applets.html

For more NetBeans web app tutorials, see http://www.netbeans.org/kb/trails/web.html

jhipp117
Offline
Joined: 2008-08-24

Thank you.  That was just the pointer I was looking for.

JHipp