You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
520 B
22 lines
520 B
package cn.edu.caztc.sokobangame;
|
|
import javax.swing.JPanel;
|
|
|
|
public class UpdateThread extends Thread{
|
|
JPanel panel;
|
|
public UpdateThread(JPanel panel) {
|
|
this.panel = panel;
|
|
}
|
|
|
|
@Override
|
|
public void run() {
|
|
while(true){
|
|
panel.repaint();
|
|
try {
|
|
Thread.sleep(10);
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
|
|
} |