`
lifengjiang
  • 浏览: 5147 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

a simple java time tips example

阅读更多
import java.awt.*;
import javax.swing.*;
public class TimerTest
{
	public static void main(String[] args)
	{
		mytask t=new mytask();
		while(true)
		{
			try
			{
				Thread.sleep(1800000);//time
				t.run();
			}catch(Exception e)
			{
			}
		}
	}
}
class mytask 
{
	public void run()
	{
		try
		{
			javax.swing.JOptionPane.showMessageDialog(null,"It's time to relax!","tips",2);
		}catch(HeadlessException e)
		{
		}
	}
}
 
分享到:
评论

相关推荐

    Java2核心技术卷I+卷2:基础知识(第8版) 代码

    A Simple Java Program 36 Comments 39 Data Types 40 Variables 44 Operators 46 Strings 53 Input and Output 63 Control Flow 71 Big Numbers 88 Arrays 90 Chapter 4: Objects and Classes 105 ...

    Java Crash Course [2016]

    "Java Crash Course" contains a multitude of tips and tricks, examples and exercises you can do to grow your Java programming skills to unprecedented levels. We chose the content of this book carefully...

    java.核心技术.第八版 卷1

    A Simple Java Program 36 Comments 39 Data Types 40 Variables 44 Operators 46 Strings 53 Input and Output 63 Control Flow 71 Big Numbers 88 Arrays 90 Chapter 4: Objects and Classes 105 ...

    Java邮件开发Fundamentals of the JavaMail API

    addition, you will need a development environment such as the JDK 1.1.6+ or the Java 2 Platform, Standard Edition (J2SE) 1.2.x or 1.3.x. A general familiarity with object-oriented programming ...

    android lint performance probe帮助.zip

    This is a simple tool to help pinpoint performance bottlenecks in individual Android Lint checks. It uses Java byte code instrumentation to collect and report performance statistics per detector for a...

    Visual C++ 编程资源大全(英文源码 控件)

    ColourPickerCB.zip A combobox derived class that provides a simple color picker(36KB)<END><br>68,ComboBoxInit_src.zip Learn how to programmatically initialize a combo box.(3KB)<END><br>69,...

    UE(官方下载)

    Parsing XML can be a time-consuming task, especially when large amounts of data are involved. As of v15.10, UltraEdit provides you with a the XML Window for the purpose of parsing ...

    Addison.Wesley.C++.by.Dissection.2002.pdf

    - **A First Program:** Provides a simple example program, typically "Hello, World!" to illustrate the syntax and structure of a C++ program. - **Problem Solving: Recipes:** Explains the problem-...

    Selenium.Testing.Tools.Cookbook.2nd.Edition.178439251

    Each recipe begins with a short introduction and key concepts along with illustrated examples of use cases, and ends with detailed but informative descriptions of the inner workings of the example. ...

    Visual C++ 编程资源大全(英文源码 其它)

    for example(2KB)<END><br>87,VBAutoIncrement_src.zip An article on how to add an automatic build incrementer to VC6(2KB)<END><br>88,MakeCodeNicer.zip A great macro for reformatting C++ source ...

Global site tag (gtag.js) - Google Analytics