多线程的龟兔赛跑程序,有动画
部分程序import java.awt.*;
import javax.swing.*;
import java.net.*;
import java.awt.event.*;
public class Race extends JApplet implements ActionListener{
JButton b=new JButton("开始");
JButton b1=new JButton("复位");
JPanel p=new JPanel();
JLabel message=new JLabel();
JLabel message1=new JLabel();
int rx=0,tx=0;
Image tortoise,rabbit;
int h,w;
Thread t,r;
2019-12-21 21:14:02
16KB
多线程
1