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

JComponent.setBackground() should refer to setOpaque()

    Details

    • Subcomponent:
    • Resolved In Build:
      b53
    • CPU:
      generic
    • OS:
      generic

      Description

      I recently was writing a test case where I wanted a JLabel's background to change color, indicating that a certain condition had been met. This didn't seem to work until I found out that I also had to setOpaque(true). This is not immediately obvious from the setBackground() docs. I think some mention should be made of this in the JavaDoc for JComponent.setBackground().

        Attachments

          Activity

            People

            • Assignee:
              svioletsunw Scott Violet (Inactive)
              Reporter:
              bchristi Brent Christian
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: