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

Button size gets bigger after a call to SwingUtilities.UpdateComponentTreeUI

    XMLWordPrintable

    Details

      Description

      Customer comments:

      I have attached two screenshots and a jar file containing modified
      'Notedpad' demo. This modified demo shows an issue we have in our
      application.

      Please unjar the attachment and execute 'java -cp . Notepad' inside the
      Notepad directory. Note the button sizes and click on 'test' button to
      see the bug effect.

      ISSUE:

      If you do not explicitly set margin/insets to buttons in a toolbar and
      later if you execute 'SwingUtilities.UpdateComponentTreeUI' on the
      parent component, the toolbuttons suddenly become bigger.

      I did some investigation and it looks like, after the UpdateUI call,
      the inside border values of the button's compound border changes from
      the default( 3,3,3,3) to the current margin.

      Ofcourse if you explicitly set a margin it fixes the problem. But there
      seems to be a bug in the way the buttons are rendered pre/post updateUI
      call.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duke J. Duke (Inactive)
              Reporter:
              gnagasunsunw Gopinath Nagasundara (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: