java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location

Spring JIRA | Kambiz Darabi | 1 decade ago
  1. 0

    I have a view with a combobox on it, which is bound to a collection of objects. When the splash screen disappears and before the application window is shown, I see an IllegalComponentStateException which says: 'component must be showing on the screen to determine its location' (cf. below). Subsequently, many such exceptions are thrown. It is however possible to continue. The reason seems to be in OverlayHelper.updateOverlay, which doesn't check whether the layeredPane of the 'overlayCapableParent' is visible. I will attach a patch, which fixes this behaviour. Many thanks Kambiz Full stack trace: 2005-10-04 15:21:14,340 ERROR ApplicationLifecycleAdvisor - component must be showing on the screen to determine its location java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1678) at java.awt.Component.getLocationOnScreen(Component.java:1652) at org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:200) at org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:175) at org.springframework.richclient.util.OverlayHelper.access$1(OverlayHelper.java:161) at org.springframework.richclient.util.OverlayHelper$OverlayTargetChangeHandler.componentResized(OverlayHelper.java:145) at java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:102) at java.awt.Component.processComponentEvent(Component.java:5314) at java.awt.Component.processEvent(Component.java:5268) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Spring JIRA | 1 decade ago | Kambiz Darabi
    java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
  2. 0

    I have a view with a combobox on it, which is bound to a collection of objects. When the splash screen disappears and before the application window is shown, I see an IllegalComponentStateException which says: 'component must be showing on the screen to determine its location' (cf. below). Subsequently, many such exceptions are thrown. It is however possible to continue. The reason seems to be in OverlayHelper.updateOverlay, which doesn't check whether the layeredPane of the 'overlayCapableParent' is visible. I will attach a patch, which fixes this behaviour. Many thanks Kambiz Full stack trace: 2005-10-04 15:21:14,340 ERROR ApplicationLifecycleAdvisor - component must be showing on the screen to determine its location java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1678) at java.awt.Component.getLocationOnScreen(Component.java:1652) at org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:200) at org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:175) at org.springframework.richclient.util.OverlayHelper.access$1(OverlayHelper.java:161) at org.springframework.richclient.util.OverlayHelper$OverlayTargetChangeHandler.componentResized(OverlayHelper.java:145) at java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:102) at java.awt.Component.processComponentEvent(Component.java:5314) at java.awt.Component.processEvent(Component.java:5268) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Spring JIRA | 1 decade ago | Kambiz Darabi
    java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
  3. 0

    java.awt.IllegalComponentStateException

    GitHub | 2 years ago | Sorceror
    java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error from deck overlay when switching away from a deck with no cards defined

    GitHub | 2 years ago | gtch
    java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
  6. 0

    [Album Catalog] Busy label stuck when search doesn't find any match

    GitHub | 2 years ago | bflorat
    java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.awt.IllegalComponentStateException

      component must be showing on the screen to determine its location

      at java.awt.Component.getLocationOnScreen_NoTreeLock()
    2. Java RT
      Component.getLocationOnScreen
      1. java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1678)
      2. java.awt.Component.getLocationOnScreen(Component.java:1652)
      2 frames
    3. org.springframework.richclient
      OverlayHelper$OverlayTargetChangeHandler.componentResized
      1. org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:200)
      2. org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:175)
      3. org.springframework.richclient.util.OverlayHelper.access$1(OverlayHelper.java:161)
      4. org.springframework.richclient.util.OverlayHelper$OverlayTargetChangeHandler.componentResized(OverlayHelper.java:145)
      4 frames
    4. Java RT
      EventDispatchThread.run
      1. java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:102)
      2. java.awt.Component.processComponentEvent(Component.java:5314)
      3. java.awt.Component.processEvent(Component.java:5268)
      4. java.awt.Container.processEvent(Container.java:1966)
      5. java.awt.Component.dispatchEventImpl(Component.java:3955)
      6. java.awt.Container.dispatchEventImpl(Container.java:2024)
      7. java.awt.Component.dispatchEvent(Component.java:3803)
      8. java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
      9. java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
      10. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
      11. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
      12. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
      13. java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
      13 frames