java:java中的Interface的应用,我…
来源:互联网 发布:彩虹六号数据查询 编辑:程序博客网 时间:2024/06/15 04:33
package com.xudeyu.interfacee;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;
import javax.swing.JOptionPane;
import javax.swing.Timer;
import static java.lang.System.*;
public class Interface
{
public static void main(String[] args)
{
ActionListener act_time = new TimPrinter();
Timer t = new Timer(1000, act_time);
t.start();
JOptionPane.showMessageDialog(null, "Quit program?");
exit(0);
}
}
class TimPrinter implements ActionListener
{
Date now = new Date();
@Override
public void actionPerformed(ActionEvent e)
{
out.println("At the tone ,the time is " + now);
Toolkit.getDefaultToolkit().beep();
}
}
0 0
- java:java中的Interface的应用,我…
- Java Interface接口的应用
- Java Interface接口的简单应用
- java @interface 注解类的应用
- Java中的Interface
- java中的interface理解
- java中的interface
- JAVA中的接口interface
- java中的interface
- java中的接口interface
- Java中的Interface
- java中的interface
- java中的interface接口
- Java中的Abstract和Interface的区别
- Java中的interface和abstract
- 归纳Java中的Interface(接口)
- java 中的接口(interface)
- Java中的接口(interface)
- Java中用原生ZipInputStream压缩加压zip文件
- java对话框选择图片,并显示到lable上
- Java中的Action练习,java输入
- QTextEdit选择文本
- java:java中一个最简单的事件练习,…
- java:java中的Interface的应用,我…
- java:java中的字符流练习,继承关系…
- adb logcat 查看日志
- java:java中的字节流的练习
- java:java中的原生ZipOutputStream…
- String转换成资源id以及String id转换成字符串,两者间的转换
- java:java中的InetAddress,获取IP地址详细信息
- java:java中的Socket 和 C#中的socket 比较
- java:java中的数据库的练习,可以读…