Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

  • This error occurs when you run your java file 
  • This error due to improper sequence of java components 
Example : If using frame , toolbar , button on toolbar

You must declare frame 
Then, toolbar
add the toolbar to the frame

Then , button 
Then add the button to the toolbar
Post a Comment