Example usage for javax.swing Timer setLogTimers

List of usage examples for javax.swing Timer setLogTimers

Introduction

In this page you can find the example usage for javax.swing Timer setLogTimers.

Prototype

public static void setLogTimers(boolean flag) 

Source Link

Document

Enables or disables the timer log.

Usage

From source file:TimerSample.java

public static void main(String args[]) {
    Runnable runner = new Runnable() {
        public void run() {
            Timer.setLogTimers(true);
            ActionListener actionListener = new ActionListener() {
                public void actionPerformed(ActionEvent actionEvent) {
                    System.out.println("Hello World Timer");
                }//  w  ww. j a  v a  2 s .  c  om
            };
            Timer timer = new Timer(500, actionListener);
            timer.start();
        }
    };
    EventQueue.invokeLater(runner);
}