HTML in JOptionPane
I need to display an image in a JOptionPane. The image is in the project src folder together with the .java source files.
The html code seems to be good as an image placeholder is shown in the JOptionPane when the program is run. The problem appears to be regarding the image path.
The html code i am using is:
<html><body><img src="imagename" /></body></html>
What file path should I give to display an image present in the src folder?
Re: HTML in JOptionPane
Images normally go in the same package as the application - in the package root, or an image subdirectory below that.
Have you tried providing an absolute path or a relative path from the package root ?