Issue
Sometimes Netbeans disables the run button.Help me to overcome this problem.I can't keep restarting netbeans again and again.When I get this problem my clean button also get disabled.
Solution
Do Run -> Set Main Project and select your project.
To explain: netbeans is very context sensitive and you may be moving out of the context of your runnable project. In general, clicking any source window thats part of the project will enable the project's Run button but if you, for example, open some random text or csv file to take a look, the Run button will disappear because the text or csv file you're looking is not part of the runnable project -- you've moved out of the project's context.
Setting a project as Main will cause it to always be the 'in context' project with respect to the Run, Debug, Profile buttons.
As the comment mentioned, your app also might still be running and you should see a Stop button to press.
Answered By - xski
Answer Checked By - Clifford M. (JavaFixing Volunteer)