import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JavaExampleImageSizeIncreaser extends JApplet implements ActionListener
{
private ImageIcon Img = new ImageIcon("java.jpg");
private JButton BtnZoom = new JButton("Click For Zoom View..!");
private int Wdth,Hght;
Container Cntnr = getContentPane();
public void init()
{
Cntnr.setLayout(new FlowLayout());
BtnZoom.addActionListener(this);
Cntnr.add(BtnZoom);
Wdth = Img.getIconWidth();
Hght = Img.getIconHeight();
}
public void actionPerformed(ActionEvent Evnt)
{
Wdth = Wdth * 2;
Hght = Hght * 2;
repaint();
}
public void paint(Graphics gr)
{
super.paint(gr);
gr.drawImage(Img.getImage(),0,0,Wdth,Hght,this);
}
}
/*<applet code= JavaExampleImageSizeIncreaser.class Height=320 width=260></applet>*/