Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 603
test Avatar asked Sep 15 '26 08:09

test


1 Answers

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

like image 184
camickr Avatar answered Sep 16 '26 21:09

camickr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!