私はこれで少し迷っています。ActionListener のコードは次のとおりです。
public static void main(String[] args)
{
ActionListener listener = new ActionListener(){
public void actionPerformed(ActionEvent event){
System.out.println("hello");
}
};
Timer displayTimer = new Timer(5000, listener);
displayTimer.start();
}
そして、hello が何度も出力されます...よくわかりません。一度だけ印刷しないのはなぜですか?
ありがとう