test
test

Reputation: 18200

JPanel custom background

OK, let's say I have this Image:

ImageIcon imageBack = new ImageIcon(System.getenv("APPDATA") + "\.my_game\bg.png");

and I have a JPanel that I can toggle on and off. How do I get that JPanel to use the custom ImageIcon?

Upvotes: 3

Views: 543

Answers (1)

camickr
camickr

Reputation: 324108

Depending on your requirement you can use one of the solutions from Background Panel.

Upvotes: 5

Related Questions