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

Not painting focus when the radio button has only icon

XMLWordPrintable

      If JRadioButton has only icon(without text), painting focus around the icon is not drawn.

      Steps)
      1. Run SwingSet
      2. Select 'RadioButtons' tab.
      3. Make sure paintborder is unchecked and paintfocus is checked.
      4. Click buttons.
      5. You will see image button is not painting focus.

      This looks like intentional after investigating BasicRadioButtonUI.java. It paints focus only when it has texts(ln#162)
      I suggests painting focus even the radio button has only icon and the reasons are:

      "setFocusPainted(true) should be working no matter what text or icon contents"
      bae-chul.kim@eng 1998-04-20

            Unassigned Unassigned
            bkimsunw Bae-chul Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: