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

[macosx] Button painting error under Java 7 on Mac

XMLWordPrintable

    • b84
    • os_x
    • Verified

        JButtons are painted when embedded in JToolBars on Java 7 in combination with using the "segmentedTextured" client property button type seems not work well on Mac

        Check screenshots for running demo app under Java 6 and Java 7 on Mac (OS X Mountain Lion):

        Java 6:

        The rightmost buttons have been polished to look more "Macish" with the help of the following code:
        putClientProperty("JButton.buttonType", "segmentedTextured");


        Java 7:

        Executing the same code on Java 7 shows that the "segmentedTextured" client property of the buttons in the rightmost toolbar breaks the painting. At least it doesn't look good to have the buttons only painted to the left and right. When adding a 20x20 px icon to a button, it actually paints ok, so pretty certain that this is a painting bug.

        Attached an executable jar file for this demo app and the source code.

          1. ButtonPaintError.java
            2 kB
            Ting-Yun Ingrid Yao
          2. On Java6.png
            37 kB
            Ting-Yun Ingrid Yao
          3. On Java7.png
            37 kB
            Ting-Yun Ingrid Yao

              serb Sergey Bylokhov
              tyao Ting-Yun Ingrid Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: