To create
a new file:
- Choose
File > New.
- Select
a template and follow the instructions in the wizard.
To edit
a file:
- Double-click
the file's node in the Filesystems window.
The
Source Editor displays the source code for the file. If the file is
a GUI form object, the Source Editor also opens a Form Editor tab.
If a Java
source file contains compilation errors, the Source Editor underlines
the code that is causing the errors in red. Put your mouse over the error
glyph in the left margin of the file to see a description of the error.
Common causes of errors are:
- You did
not mount your directory at the Java package root. The package root
is the directory that contains the default package, or the uppermost
directory in your source code's package structure. For example, for
the Java class com.myapp.MyApp.java
you must mount the directory that contains the com directory.
- You have
not mounted Java libraries that the source file depends on. To mount
JAR file libraries, choose File > Mount Filesystem, then select Archive
File and follow the steps in the wizard.
For a more
detailed explanation of editing features, see Using
NetBeans IDE - Creating and Editing Java Source Code.
|