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

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have 2 forms that share a single form model and both forms have some common fields in the form model. The forms are put on a JInternalFrame and only 1 form is shown at a time as it behaves like a wizard for data entry. BUT I am not using the wizardPage/FormbackedDialog... The forms are extended from AbstractForm and the view creates an instance of both forms when it is constructed. The view put the form on the JInternalFrame one at a time. The user has to fill in the some required info on the first page before the user can proceed to the next page. When the view first show, if we type in something invalid, the error status showed up and everything is as expected. After we corrected the value and proceeds to the next page, and if we change the same field on the 2nd form to something invalid again, this exception showed up. Note that the exception only show up when the validation error has occurred on one form and has been corrected and then go to another form to trigger the validation error on the same field. If you trigger the same validation error on the same form without touching the same field on the other form, this is fine. java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1507) at java.awt.Component.getLocationOnScreen(Component.java:1481) at org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:185) at org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:165) at org.springframework.richclient.util.OverlayHelper.access$000(OverlayHelper.java:44) at org.springframework.richclient.util.OverlayHelper$2.ancestorMoved(OverlayHelper.java:100) at java.awt.Component.processHierarchyBoundsEvent(Component.java:5299) at java.awt.Component.processEvent(Component.java:4922) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) Link about this issue in the forum http://forum.springframework.org/viewtopic.php?t=3797
    via by Henry Szetu,
  • I have 2 forms that share a single form model and both forms have some common fields in the form model. The forms are put on a JInternalFrame and only 1 form is shown at a time as it behaves like a wizard for data entry. BUT I am not using the wizardPage/FormbackedDialog... The forms are extended from AbstractForm and the view creates an instance of both forms when it is constructed. The view put the form on the JInternalFrame one at a time. The user has to fill in the some required info on the first page before the user can proceed to the next page. When the view first show, if we type in something invalid, the error status showed up and everything is as expected. After we corrected the value and proceeds to the next page, and if we change the same field on the 2nd form to something invalid again, this exception showed up. Note that the exception only show up when the validation error has occurred on one form and has been corrected and then go to another form to trigger the validation error on the same field. If you trigger the same validation error on the same form without touching the same field on the other form, this is fine. java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1507) at java.awt.Component.getLocationOnScreen(Component.java:1481) at org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:185) at org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:165) at org.springframework.richclient.util.OverlayHelper.access$000(OverlayHelper.java:44) at org.springframework.richclient.util.OverlayHelper$2.ancestorMoved(OverlayHelper.java:100) at java.awt.Component.processHierarchyBoundsEvent(Component.java:5299) at java.awt.Component.processEvent(Component.java:4922) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) Link about this issue in the forum http://forum.springframework.org/viewtopic.php?t=3797
    via by Henry Szetu,
  • Errors and red color
    via GitHub by dprinse
    ,
  • Cannot paste
    via GitHub by michaelzangl
    ,
    • java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1507) at java.awt.Component.getLocationOnScreen(Component.java:1481) at org.springframework.richclient.util.OverlayHelper.positionOverlay(OverlayHelper.java:185) at org.springframework.richclient.util.OverlayHelper.updateOverlay(OverlayHelper.java:165) at org.springframework.richclient.util.OverlayHelper.access$000(OverlayHelper.java:44) at org.springframework.richclient.util.OverlayHelper$2.ancestorMoved(OverlayHelper.java:100) at java.awt.Component.processHierarchyBoundsEvent(Component.java:5299) at java.awt.Component.processEvent(Component.java:4922) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615)
    No Bugmate found.