swingx
  1. swingx
  2. SWINGX-1343

JXStatusBar incorrectly returns preferred size for minimum size

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: Misc Component
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,343

      Description

      JXStatusBar is blowing up parent containers. It needs a minimum width of 0.

      A JXLabel or JLabel has a preferred size which is the render size of its text.

      JXStatusBar has a LayoutManager in BasicStatusBarUI which uses the preferred
      size as the minimum size.

      If you put a JXLabel into a JXStatusBar, then the JXStatusBar minimum size is
      then the size of the text.

      This blows the enclosing window out of proportion.

      If you override getMinimumSize() in JXStatusBar to return a 0 width, with the
      preferred height, then all behaves correctly.

      Proper fix: The LayoutManager in BasicStatusBarUI should return 0 width (and
      possibly height) from minimumSize().

        Activity

          People

          • Assignee:
            Karl Schaefer
            Reporter:
            arren
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: