JComponent.setBackground() should refer to setOpaque()

XMLWordPrintable

    • b53
    • generic
    • generic

      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().

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: