62,614
社区成员
发帖
与我相关
我的任务
分享
JPanel topPanel = new JPanel(){
public void paint(Graphics g){
super.paint(g);
//下面是取得你的背景图片,你根据你自己的要求来取得这个图片,不管什么方法,得到就OK
ImageIcon icon = new ImageIcon(ClassLoader.getSystemResource("com/res/xxx.jpg"));
icon.paintIcon(this, g, 0, 0);
}
};