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

JCheckBox & JRadioButton's setBorderPainted() partially blocks out its content

XMLWordPrintable

      As demontrated in the attached program which shows 2 columns of various
      types of JCheckBoxes and JRadioButtons. The ones on the right column have
      their setBorderPainted() set. There's an undesirable side-effect of the
      square checkboxes and/or the icon image of a red ball on the left side of
      the component are partially obscured by the 3-D looking raised bevel border.
      Moreover, when having the border painted, the checkbox will have the 3-D appearance but with the content been partially blocked out; it appears as
      if the square/icon is sinking and skewing underneath. This is worst when
      the component is in the unselected state.

      Perhaps the minimum size implementation of the JCheckBox should taken into
      account the wrapped around border so that its square checkbox or icon is
      always centered.

      For the JRadioButton the raised-bevel border is very appropriate because
      it would make the component resembles a button; however, I don't entirely
      believe if this is the right choice for the JCheckBox.

            shickeysunw Shannon Hickey (Inactive)
            rphamsunw Roger Pham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: