1
Answer

Exception in thread "main" java.lang.NullPointerException

Photo of Dwi Hyuga

Dwi Hyuga

7y
891
1
  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)