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

In FlowLayout PreferredSize and Actual Size of component should be same

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Provided FlowLayout container got enough space to honour preferred size
      of child component, than preferred size of component should be honoured by
      container with FlowLayout
      Steps to reproduce:
      1) Run attached test TestFlowLayout
      2) Click on button "Increase font size", this will change component preferred size.
      3) This will display the preferred size and actual size, note they are not same
         while there is enough space in container, and flowlayout java document says
         "A flow layout lets each component assume its natural (preferred) size"

      So either FlowLayout should honour component preferred size or FlowLayout java
      document should be modified.

      Note:
      There also seems a trend.
      When using font size 14, Actual size is equals to preferred size in font 13
      Similarly in font size 15, Actual size is equals to preferred size in font 14
      And so on.

      ###@###.### 2004-03-04

        Attachments

          Activity

            People

            Assignee:
            son Oleg Sukhodolsky (Inactive)
            Reporter:
            hsinghsunw Hemant Singh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: