JPanel setBackground(Color.BLACK) does nothing

前端 未结 6 1132
不知归路
不知归路 2021-01-04 12:29

I have the folowing custom JPanel and I have aded it to my frame using Netbeans GUI builder but the background won\'t change! I can see the circle, drawing with g.fillOval()

6条回答
  •  独厮守ぢ
    2021-01-04 12:53

    If your panel is 'not opaque' (transparent) you wont see your background color.

提交回复
热议问题