Java Netbeans AWT-EventQueue-0, isInterrupted

Hallo.

Ich habe ein Problem mit Netbeans.
Ich habe ein Button der soll wenn man drauf klick eine andere Klasse(KeyConfig) öffnen und ein Spiel Starten.
Wenn ich die Klasse KeyConfig ausführe läuft das Spiel einwandfrei. Ich will ein Startbild machen.

Also wenn ich auf den Button klicke stürzt das Programm ab und ich bekomme folgende Fehlermeldung:

Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread
 at java.awt.EventQueue.invokeAndWait(EventQueue.java:1223)
 at graphics.ScreenManager.setFullScreen(ScreenManager.java:124)
 at test.GameCore.init(GameCore.java:112)
 at tilegame.GameManager.init(GameManager.java:47)
 at Menu.Menu.init(Menu.java:23)
 at Menu.KeyConfig.init(KeyConfig.java:43)
 at test.GameCore.run(GameCore.java:71)
 at Menu.StartBild$1$1.run(StartBild.java:53)
 at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
 at java.awt.EventQueue.access$000(EventQueue.java:101)
 at java.awt.EventQueue$3.run(EventQueue.java:666)
 at java.awt.EventQueue$3.run(EventQueue.java:664)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Ich weiß das irgendwas mit dem isInterrupted() sein muss da ich mit debugg schon das Programm einzelnt durchgegangen bin und bei der Abfrage: if(isInterrupted() || !pumpOneEventForFilters(id))
ist isInterrupted unbekannt und !pumpOneEventForFilters(id) true

Ich habe keine ahnung was ich machen soll ich habe auch schon eine Interrupted Abfrage eingebaut.

System.out.println("IsInterrupted1: " + Thread.currentThread().isInterrupted()); // IsInterrupted: false
 Thread.currentThread().interrupt(); // Setze Interrupted-Flag
 System.out.println("IsInterrupted: " + Thread.currentThread().isInterrupted()); // IsInterrupted: true
 System.out.println("Interrupted1: " + Thread.currentThread().interrupted()); // IsInterrupted: true
 System.out.println("Interrupted: " + Thread.currentThread().interrupted()); // Interrupted: false
 try { 
 Thread.sleep(500); // Verursacht Exception
 System.out.println("Hello World"); // Das sehen wir nicht
 } 
 catch (InterruptedException ex) { 
 System.out.println(ex.getMessage()); 
 // sleep interrupted
 System.out.println("I-Flag: " + Thread.currentThread().isInterrupted()); // I-Flag: false
 } 
 new KeyConfig().run();

Was muss ich tun damit der Interruped true ist oder das ich die KeyConfig Klasse ausführen kann??

Hier noch den Quellcode für den Button ActionListener:

startBut.addActionListener(new java.awt.event.ActionListener() {
 @Override
 public void actionPerformed(java.awt.event.ActionEvent evt) {
// new KeyConfig().run();
// System.out.println("Start Javio");

 SwingUtilities.invokeLater(new Runnable() {
 @Override
 public void run() {

 System.out.println("IsInterrupted1: " + Thread.currentThread().isInterrupted()); // IsInterrupted: false
 Thread.currentThread().interrupt(); // Setze Interrupted-Flag
 System.out.println("IsInterrupted: " + Thread.currentThread().isInterrupted()); // IsInterrupted: true
 System.out.println("Interrupted1: " + Thread.currentThread().interrupted()); // IsInterrupted: true
 System.out.println("Interrupted: " + Thread.currentThread().interrupted()); // Interrupted: false
 try { 
 Thread.sleep(500); // Verursacht Exception
 System.out.println("Hello World"); // Das sehen wir nicht
 } 
 catch (InterruptedException ex) { 
 System.out.println(ex.getMessage()); // sleep interrupted
 System.out.println("I-Flag: " + Thread.currentThread().isInterrupted()); // I-Flag: false
 }

 new KeyConfig().run();
 System.out.println("Start Javio");
 }
 });

KANN GESCHLOSSEN WERDEN !!!

Problem wurde geändert…Keine Lösung zu den Problem vorhanden -.-