In this section we cover and explain Create a Image view program in details for freshers and experienced
previous | Home | Next |
Example
To Create a Image view
import java.applet.Applet; import java.awt.*; import java.net.*; public class ImageView extends Applet { Image image; public void init() { try { URL url = new URL(getCodeBase(), getParameter("image")); image = getImage(url); } catch (MalformedURLException e) { System.err.println(e); } } public void paint (Graphics g) { g.drawImage(theImage, 0, 0, this); } }
previous | Home | Next |