Right-click on the project node, go to "Configure", select the main class for your application. Then clean and build.
Even if this does not solve your problem, delete the Netbeans cache by deleting the folder (index)
User\.netbeans\6.9\var\cache\index\
Rakesh
source share