继承jpanel,然后再上面画出图片。给你点实例代码,但你说的不够清楚,希望我的理解是你问的
先继承jpanel
private final ImageIcon p2Bg = new ImageIcon(XXX.class.
getResource("/image/p2.jpg"));
public void paintComponent(Graphics gs) {
super.paintComponent(gs);
//画背景图片
gs.drawImage(p2Bg.getImage(), 0, 0, 800, 560, this);
}