Code:
java.lang.NullPointerException
at Uvodni.teme(Uvodni.java:43)
at Uvodni.<init>(Uvodni.java:61)
at Uvodni$1.run(Uvodni.java:25)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.NullPointerException
at Uvodni.teme(Uvodni.java:43)
at Uvodni.<init>(Uvodni.java:61)
at Uvodni$1.run(Uvodni.java:25)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Mislim da greshim negde sa ovim nizom na liniji 43
Code:
39 private String[] teme(){
40 String[] temp = null;
41 UIManager.LookAndFeelInfo[] laf = UIManager.getInstalledLookAndFeels();
42 for(int i = 0; i < laf.length; i++){
43 temp[i] = laf[i].getName();
44
45 }
return temp;
}
39 private String[] teme(){
40 String[] temp = null;
41 UIManager.LookAndFeelInfo[] laf = UIManager.getInstalledLookAndFeels();
42 for(int i = 0; i < laf.length; i++){
43 temp[i] = laf[i].getName();
44
45 }
return temp;
}
Ali ne znam kako to da reshim molim vas ako neko zna reshenje.
Probao sam sa try catch blokovima i onda mi pokrene program ali nishta ne prikazuje sem frejma postavio sam i ceo kod dole.
I poceo sam neki kalkulator da pravim i pojavio mi se isti problem ali cu pokushati sam da ga reshim ako mi neko pokaze kako ovo da rashim.
Unapred hvala