// Java (Applet) Fractal Explorer
// (c) 1997 by Nils Pipenbrinck
// fixed in 2005 by doj after decompilation of .class files with jad

import java.awt.*;

class ImagePanel extends Component
{
    public Image theImage;
    public boolean drawDrag;
    public Rectangle R;

    ImagePanel()
    {
        drawDrag = false;
        R = new Rectangle();
    }

    public final void paint(Graphics g)
    {
        if((g != null) & (theImage != null))
        {
            Rectangle rectangle = getBounds();
            g.drawImage(theImage, 1, 1, rectangle.width - 2, rectangle.height - 2, this);
            g.setColor(Color.black);
            g.drawRect(0, 0, rectangle.width - 1, rectangle.height - 1);
            if(drawDrag)
            {
                g.drawRect(R.x - 1, R.y - 1, R.width + 2, R.height + 2);
                g.drawRect(R.x + 1, R.y + 1, R.width - 2, R.height - 2);
                g.setColor(Color.white);
                g.drawRect(R.x, R.y, R.width, R.height);
            }
        }
    }

}
