/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cemte.jacek.mpo;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.*;
/**
 *
 * @author jwr
 */
public class ImageViewPanel extends JFrame{
    Image img=null;
    int w,h;
    public ImageViewPanel(int xLoc, int yLoc, int width, int height, Image img, String title){
        super(title);
        setSize(width,height);
        setLocation(xLoc,yLoc);
        this.img=img;
        w=width;
        h=height;
        setVisible(true);
        this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        repaint();
    }
    public void paint(Graphics g){
        g.drawImage(img, 0, 0, w, h, this);
    }
}
