import java.applet.*;
import java.awt.*;
import javax.swing.*;

public class DogTextImage extends JApplet
{
    public void init()
    {
    	Image image = getImage(getCodeBase(), "dog.gif");
    	ImageIcon icon = new ImageIcon(image);
    	Image rollImage = getImage(getCodeBase(), "dog-roll.gif");
	ImageIcon rollIcon = new ImageIcon(rollImage);
    	Image pressImage = getImage(getCodeBase(), "dog-press.gif");
	ImageIcon pressIcon = new ImageIcon(pressImage);
    	JButton button = new JButton("The Dog Zone", icon);
	button.setVerticalTextPosition(SwingConstants.BOTTOM);
	button.setHorizontalTextPosition(SwingConstants.CENTER);
	button.setRolloverIcon(rollIcon);
	button.setPressedIcon(pressIcon);
    	getContentPane().add(button, BorderLayout.NORTH);
	System.out.println("Code base is " + getCodeBase());
	setSize(220, 150);
    }
}
