There are 2 tips
Thank you very much for your message. There are 2 tips for 2 ways to add the image respectively:
1. Use "Thread.currentThread().getContextClassLoader().getResource()" to load the image if the image is in jar file.
If the image file is in classpath (in the jar file), you can load the image through ClassLoader.getResource(). Then please be careful to use this classloader "Thread.currentThread().getContextClassLoader()".
2. Use "System.getProperty("application.home")" to get the exe folder if the image is in disk.
If the image file is in disk, you select to load the file by full pathname. Then you can use "System.getProperty("application.home")" to get the folder of exe file.
I have write a demo program to show the background image and icon image, you can download here.
Please don't hesitate to contact me if your solution not succeed.