?? timecount.java
字號:
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;
}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -