Dwi Hyuga

Dwi Hyuga

  • NA
  • 116
  • 21.7k

Exception in thread "main" java.lang.NullPointerException

Feb 9 2018 12:21 AM
  1. public static void main(String args[]){  
  2.         java.awt.EventQueue.invokeLater(() -> {  
  3.             daftar_timbang daftim = new daftar_timbang();  
  4.         });  
  5.         txtCoba.setText("a");  
  6.     } 
 
 it shows
Exception in thread "main" java.lang.NullPointerException
 
and, txtCoba is a static jtextfield
help me to get rid of that
 
 

Answers (1)