NetBeans (as of version 7.0) is not yet usable for Mozilla development. This page is currently being used to document how NetBeans would be set up for Mozilla development, and the problems that prevent it being usable, or a good solution. This documentation is primarily intended for the NetBeans developers to help them in reproducing the problems so that they can improve NetBeans to better work with large projects like Mozilla. The NetBeans work specifically to get NetBeans working well with Mozilla is tracked in NetBeans Bugzilla, bug 197297.
For the code intelligence type features of IDEs like NetBeans to work correctly, it is necessary for the IDE to know a sane set of build options for building the source files. It needs this information to determine the value of preprocessor defines, source files include paths (to find the correct headers, and the things they define), etc. There are two ways that IDEs typically (and NetBeans specifically) do that for projects when the IDE does not itself managing the build system; either the IDE parses the output from an actual build (potentially a build log), or else the binaries must be built with specific debug information, and the IDE examines the binaries. At any rate, that's why we're talking about building here...
With a few modifications, detailed momentarily, (read the modifications before proceeding!) the recommended documentation for building Firefox is the Simple Firefox build wiki page.
Modification 1: create a .mozconfig
Modification 2: build command should create a log
Also note about getting and building source snapshots.