图片加载问题……

编码的三叔 2012-11-23 08:24:27
public void run(){
while(true){
repaint();
try{Thread.sleep(10);}
catch(InterruptedException e){;}
}
}
public void paint(Graphics g){
g.drawImage(imagelang,x,y,this);
}
...全文
143 2 打赏 收藏 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
gloomyfish 2012-11-23
  • 打赏
  • 举报
回复
代码太混乱了,看看这里吧!
编码的三叔 2012-11-23
  • 打赏
  • 举报
回复
如果用这个的时候 背景是怎么加载的??? ImageIcon imagebg = new ImageIcon("背景.jpg"); JLabel labelbg = new JLabel(imagebg); labelbg.setBounds(0,0,imagebg.getIconWidth(),imagebg.getIconHeight()); this.getRootPane().add(labelbg,new Integer(Integer.MIN_VALUE)); 是不显示背景的

62,620

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧