Reputation: 18200
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
Reputation: 324108
Depending on your requirement you can use one of the solutions from Background Panel.
Upvotes: 5