package br.com.bancooriginal.cyberbank.awt.component;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

/**
 * Classe customizada para criar paineis com imagem no fundo.
 * @author filipe.sa
 *
 */
public class PainelImagem extends JPanel {
	
	private Image image = null;

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public PainelImagem(Image image){
		this.image = image;
	}

	protected void paintComponent(Graphics g) {

		super.paintComponent(g);
	    
		if (image != null){
	        g.drawImage(image,0,0,this);
	        
	    }
	}

}
