import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.Timer; public class Java_2{
public static void main(String[] args){
ActionListener listener = new ____________();
Timer t = new Timer(10000, listener);
t.start();
JOptionPane.showMessageDialog(null, "退出程序吗?");
System.exit(0);
}
}
class TimePrinter ___________ ActionListener{ public void actionPerformed(_________ event){
Date now = new Date();
System.out.println("At the tone, the time is " + now);
Toolkit.getDefaultToolkit().beep();
}
}
每隔10秒出现一次时间 实在是解不出 求大神解答
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.Timer; public class Java_2{
public static void main(String[] args){
ActionListener listener = new ____________();
Timer t = new Timer(10000, listener);
t.start();
JOptionPane.showMessageDialog(null, "退出程序吗?");
System.exit(0);
}
}
class TimePrinter ___________ ActionListener{ public void actionPerformed(_________ event){
Date now = new Date();
System.out.println("At the tone, the time is " + now);
Toolkit.getDefaultToolkit().beep();
}
}
每隔10秒出现一次时间 实在是解不出 求大神解答