Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6297399

setComponentZOrder doesn't update layout manager sometimes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0, 6
    • client-libs
    • None
    • generic, x86
    • generic, windows_xp

      Method setComponentZOrder allows to efficiently change z-order of a component. It works when component is moved inside of one container and when it is moved between containers. In the latter case, it calls LayoutManager.removeLayoutComponent (similar to remove) and LayoutManager.addLayoutComponent (similar to addImpl). However, in the first case it doesn't do these calls. It appears that this causes some problems, one known case is 6185498.

      It is unclear how to fix this problem. It roots to a more general problem - there is no way to get the constraints for a component so we can not preserve constraints. Therefore, the current implementation seems the safest - it allows to preserve them when it is possible, allowing developers to override this behavior (setComponentZOrder is not final). However, if there will be many cases when addLayoutComponent/removeLayoutComponent needs to be called then we should revisit this decision. This bug is the placeholder for such feedback and votes.
      ###@###.### 2005-07-15 14:57:17 GMT

            dav Andrei Dmitriev (Inactive)
            dmikhalksunw Denis Mikhalkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: