⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timecount.java

📁 此源码是一款扫雷游戏
💻 JAVA
字号:
//计时器TimeCount
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -