Skip to content

Instantly share code, notes, and snippets.

@sjh836
Created March 18, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjh836/dd8d721c2dcede9240c2f4fa20fabb4b to your computer and use it in GitHub Desktop.
Save sjh836/dd8d721c2dcede9240c2f4fa20fabb4b to your computer and use it in GitHub Desktop.
javax.swing.Timer 로 이벤트 반복2
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Date;
class TimerStudy implements ActionListener
{
int n=0;
public void actionPerformed(ActionEvent e) {
Date date=new Date();
n++;
System.out.println(n+"번째 호출: "+date.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment