by Dinesh Thakur Category: AWT and Applets


import java.awt.*;

import java.applet.*;
import javax.swing.*;
public class JavaExampleEventImage extends JApplet
    Image Img;
    final int WIDTH = 318;
    final int HEIGHT = 100;
    public void init()
       Img =getImage(getCodeBase(),"java.jpg");
       public void paint(Graphics gr)
          // Draw image at Natural size 318 X 100
          gr.drawImage(Img, 0, 0, this);
          gr.drawImage(Img, 0, HEIGHT, WIDTH * 2, HEIGHT * 2, this);
/*<applet code= JavaExampleEventImage.class Height=300 width=240></applet>*/

Java Example Event Image

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Search Content

Popular Article