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

public class PortraitJPanel extends JPanel{//PORTRAIT

	private ImageIcon portrait=new ImageIcon("./images/pjs/alchemist.GIF");
	
	public void paintComponent (Graphics g){
		
		Dimension d = getSize();
		g.drawImage(portrait.getImage(), 0, 0, d.width, d.height, null);
		setOpaque( false );
		super.paintComponent(g);
		
		
		///portrait.paintIcon(this,g,0,0);
	}
	
	
	public void update(Graphics g){	
		paintComponent(g);
		
	}
	

	
	public void updatePortrait(String p){
		portrait=new ImageIcon(p);
		
		repaint();
		
	}
	
}