timecount.java

来自「一个不是很经典的找雷游戏」· Java 代码 · 共 40 行

JAVA
40
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package 挖雷游戏;/** * * @author Administrator */import java.awt.*;import javax.swing.*;public class TimeCount extends Thread{  JTextField textShowTime;  int i=0;  public TimeCount()  {    textShowTime=new JTextField(5);    textShowTime.setEditable(false);    textShowTime.setFont(new Font("Plaint",Font.BOLD,24));     textShowTime.setHorizontalAlignment(JTextField.RIGHT);  }  public void run()  { i=0;    while(i<=999)    {      textShowTime.setText(""+i);      i++;      try{         sleep(1000);       }      catch(InterruptedException e){         break;       }    }  } }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?