Java Reference
In-Depth Information
Aftercreating
HelloWorld
,NetBeansorganizestheworkspaceintoprojects,edit-
or, navigator, and tasks work areas. The projects area helps you manage your projects
and is organized into the following tabs:
• The Projects tab is the main entry point to your project's source and resource
files. It presents a logical view of important project contents.
• The Files tab presents a directory-based view of your projects. This view in-
cludes any files and folders not shown on the Projects tab.
• The Services tab presents a logical view of resources registered with the IDE,
for example, servers, databases, and web services.
The editor area helps you edit a project's source files. Each file is associated with
itsowntab,whichislabeledwiththefilename.Forexample,
Figure1-2
revealsaHel-
loWorld.java tab that provides a skeletal version of this source file's contents.
The navigator area presents the Navigator tab, which offers a compact view of the
currentlyselectedfile,andwhichsimplifiesnavigationbetweenvariouspartsofthefile
(e.g., class and method headers).
Finally,thetaskarea presents aTaskstabthat reveals ato-dolist ofitems that need
toberesolvedfortheproject'svariousfiles.Eachitemconsistsofadescription,afile-
name, and the location within the file where resolution must take place.
Replace theHelloWorld.javatab'scontentswith
Listing1-1
,
keepingthe
package
helloworld;
statementatthetopofthefiletopreventNetBeansfromcomplaining
aboutanincorrectpackage.Continuing,selectRunMainProjectfromtheRunmenuto
ing.