Workshop 2007 JRE Java Support
Installation
Home
CalcTool
Java Applets
Friends/Family
Gardening
Woodworking
Forums

Starting NetBeans

Once you start NetBeans, you will see three windows in the IDE (Integrated Development Environment). The top left window has three tabs: Projects, Files, and Runtime.  The lower left window is the Navigator window. This window will be useful to scroll through all available classes and objects on your applet that you will create. The right window is the Welcome window. You can close this at any time by clicking on the “x” next to “Welcome”.  Across the bottom, you will see an Output window.  Compile time, run-time, and debugging information will be displayed here. Here's a screen shot of this.

 

Create a new project by choosing File/New Project.

You will have several options. If you are creating an applet from scratch (i.e. not importing existing code from another applet), you will choose the default “General” category and the “Java Class Library” project. Click the “Next” button. 

You should see your project created in the Projects window (upper left corner). It contains a few default items. Here’s a screen shot.

 

Add a package to your project.

A package is a convenient way of organizing your files. Java’s suggested naming convention is use the reverse order (in lower case) of the url where the applet will be deployed. For example, if I’m going to deploy the Hello World applet in a folder with the name “helloworld” at www.jimrolf.com, I will create the package com.jimrolf.helloworld. If you are going to deploy this applet (and folder) at www.usafa.edu, you might choose the package name edu.usafa.helloworld.  This will create three nested folders: edu, usafa, and helloworld.  All source files for this applet will be located in helloworld.  This nomenclature is not so important if you are writing a single applet with one file. However, as you start to build tools that you want to re-use in several applets, this convention is particularly helpful. So I would advise using it right from the start.

Creating a Project