代码如下:
/**
* 重写方法
*/
jpanel = new JPanel(new BorderLayout()) {
public void paintComponent(Graphics g) {
//super.paintComponent(g);
ImageIcon ii = new ImageIcon("registerImages/northBack.jpg");
g.drawImage(ii.getImage(), 0, 0, g_nWidth, (int) (g_nHeight * 0.41), ii.getImageObserver());
}
};