Salve a tutti! Ho un problema che non riesco proprio a risolvere. Praticamente io sfrutto un JLabel per visualizzare un countDown, ma sfortunatamente ci viene dato questo erore (ma non capiamo da cosi derivi dato che derivi dato che sembri tutto molto logico):

codice:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException 	at GiocoEffettivo.GiocoForza4$CountDown$1.actionPerformed(GiocoForza4.java:159) 	at javax.swing.Timer.fireActionPerformed(Timer.java:312) 	at javax.swing.Timer$DoPostEvent.run(Timer.java:244) 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) 	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721) 	at java.awt.EventQueue.access$200(EventQueue.java:103) 	at java.awt.EventQueue$3.run(EventQueue.java:682) 	at java.awt.EventQueue$3.run(EventQueue.java:680) 	at java.security.AccessController.doPrivileged(Native Method) 	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:691) 	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244) 	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163) 	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147) 	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139) 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)
il codice in questione è questo:
codice:
public void ShowTimer(String text)     {         time2.setText(text);             }          public void Random()  // da definire   {              }           static class CountDown     {         private static int attesa = 0;         private static GiocoForza4 f4;         private static Timer t;                 private static int i;                  public CountDown(GiocoForza4 f4)         {             this.f4 = f4;// initializes the reference to the Welcome class.             String text = ("        " + i + "        ");             f4.ShowTimer(text);         }                  public static void start()         {             new Timer(attesa, new ActionListener()                     {                             @Override                             public void actionPerformed(ActionEvent e)                              {                                 for(i = 5; i >= 0; i--)                                 {                                     try                                      {                                             synchronized(((Timer) e.getSource()))                                         {                                             ((Timer) e.getSource()).wait(1000);                                         }                                                                                System.out.println(i);                                          String text = ("        " + i + "        ");                                         f4.ShowTimer(text);                                         //f4.ShowTimer(text);                                                                                  if(i == 0)                                         {                                              ((Timer) e.getSource()).stop();                                             // porre il random                                          }                                     }                                      catch (InterruptedException ex)                                      {                                         Logger.getLogger(GiocoForza4.class.getName()).log(Level.SEVERE, null, ex);                                     }                                 }                             }                                              }).start();         }                   }
spero possiate essermi d'aiuto..