2011-10-04 46 views

回答

1

如果要更新该屏幕像这样写哪个画面:

public LoadingScreen()//This is constructor 
{ 
     createGUI(); 
     callingThread(); 
} 
public void createGUI() 
{ 
     //write the all code here; 
} 
public void callingThread() 
{ 
     Thread thread=new Thread() 
     { 
      Thread.sleep(3000); 
      deleteAll(); 
      invalidate(); 
      createGUI(); 
     } 
     thread.start(); 
} 

这样你就可以刷新屏幕。这里“invalidate()”刷新屏幕并且createGui()再次将内容添加到屏幕上;