开发者

jpanel with image in background

I have a simple doubt, I need to replace this:

panel[1].setBackground(Color.red);

For an image, but I want to avoid a new jlabel for image, because I tested and I have another label inside this panel th开发者_JAVA技巧at is pushed to below


Background Panel shows two approaches. One involves custom painting, the other involves using a JLabel. The approach you use will be based on your requirement. The custom painting is more flexible but a little more complicated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜