JToggleButton does not display caption if setAction is called

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 8, 11, 17, 21, 26
    • Component/s: client-libs
    • None

      The issue is discovered in JDK-8316274

      example of not displayed captions with
      https://bugs.openjdk.org/secure/attachment/106474/window.png

      how it should look like:
      https://bugs.openjdk.org/secure/attachment/116609/toggleButtonsWithCaptions.png

      Affects at least Metal, Nimbus, Motif and GTK LaFs

      Note that the toggle buttons in window.png do not display captions 1 and 2.

      However, the captions appear when I replace toggleButton.setAction with addActionListener ( see toggleButtonsWithCaptions.png, or run `java TestButtonGroupFocusTraversal.java 1`)

      https://bugs.openjdk.org/secure/attachment/116610/TestButtonGroupFocusTraversal.java

            Assignee:
            Alexander Zvegintsev
            Reporter:
            Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: