public class WelcomePanel extends JPanel {
private ImageIcon welcomImageIcon = null;
public WelcomePanel(){
URL url = this.getClass().getResource("/images/welcome.jpg");
this.welcomImageIcon = new ImageIcon(url);
}
public void paintComponent(Graphics g) {
g.drawImage(this.welcomImageIcon.getImage(), 0, 0, this.getWidth(), this.getHeight(), this);
}
}