Can anyone suggest or explain to me why this image is not showing?
import javax.swing.*;
import java.awt.*;
import java.applet.Applet;
public class Zoom1 extends JApplet
{
private Image logo1;
private ImageIcon logo2;
public void init()
{
logo1 = getImage( getDocumentBase(),"image4.bmp");
logo2 = new ImageIcon("image4.bmp");
}
public void paint(Graphics g)
{
g.drawImage(logo1, 0, 0, this);
g.drawImage(logo1, 0, 120, getWidth(), getHeight() -120, this);
logo2.paintIcon(this, g, 180, 0);
}
public static void main(String []args)
{
Zoom1 zoom1 = new Zoom1();
JFrame frame = new JFrame("ShowZoom");
frame.setTitle("Show zoomed image in frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(600, 400);
//frame.getContentPane().add(Zoom,
//BorderLayout.CENTER);
frame.setVisible(true);
}
}