Ich habe folgendes Problem:
Ich will mit setUndecourated(true); die Titelleiste von this löschen, was aber nicht funktioniert. Stattdessen werden folgende Fehler angezeigt:
java.awt.IllegalComponentStateException: The frame is displayable.
at java.awt.Frame.setUndecorated(Frame.java:795)
at mission1.Frame1.this_windowOpened(Frame1.java:1011)
at mission1.Frame1_this_windowAdapter.windowOpened(Frame1.java:1435)
at java.awt.Window.processWindowEvent(Window.java:1099)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at mission1.Frame1.processWindowEvent(Frame1.java:782)
at java.awt.Window.processEvent(Window.java:1061)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Warum? Und vor allem wie lässt sich dieses Problem beseitigen?
mfg
Ich will mit setUndecourated(true); die Titelleiste von this löschen, was aber nicht funktioniert. Stattdessen werden folgende Fehler angezeigt:
java.awt.IllegalComponentStateException: The frame is displayable.
at java.awt.Frame.setUndecorated(Frame.java:795)
at mission1.Frame1.this_windowOpened(Frame1.java:1011)
at mission1.Frame1_this_windowAdapter.windowOpened(Frame1.java:1435)
at java.awt.Window.processWindowEvent(Window.java:1099)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at mission1.Frame1.processWindowEvent(Frame1.java:782)
at java.awt.Window.processEvent(Window.java:1061)
at java.awt.Component.dispatchEventImpl(Component.java:3598)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Window.dispatchEventImpl(Window.java:1585)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Warum? Und vor allem wie lässt sich dieses Problem beseitigen?
mfg