重写JPanel的paintComponent方法:JPanel jp = new JPanel() { public void paintComponent(Graphics g) { super.paintComponent(g); ImageIcon img = new ImageIcon("xxx.jpg"); g.drawImage(img.getImage(), 0, 0, null); }};