Hi
I’ve written a java program that displays it’s text in a browser (I do not want to use an Applet). How do I display images in the browser, because when I write
<img src = \"image.jpg\" alt= \"Image\"/>
the image isn’t displayed, only the alt text.
Here is my code to display the HTML:
private void displayHTML() throws IOException
{
String contentBodyStart="<HTML>" + "<BODY style = \"background-color:#D9E37B\">" +
"<br><br><br><br><div align = \"center\">" +
"<h2> Image page </h2>" +
"<img src = \"image.jpg\" alt= \"Image\"/> <br>" +
"</div> </br>" +
"</BODY>" +
"</HTML>" ;
out.println(contentBodyStart);
}