For Timer you need at least the following:
1) Add your import APIs
import java.util.*; // need this for the timer "java.util.Timer;" works too
import java.awt.event.*; // need this for your actionListener "java.awt.event.ActionListener;" works too)
2) Create your Timer (Milliseconds, action) *this is encapsulated code to reduce wordage;

500 below is wait in Milliseconds- FYI
Timer timer = new Timer(500, new ActionListener() {
public void actionToDo(ActionEvent e) {
//Your action code here
}
}); // closes timer's loaded constructor
3)Start your timer
timer.start(); // start now, wait 500 milliseconds and do my action code!
*timer.stop(); // stops your timer

I used this to change name of button after it was pressed then return to the orginal label. *timer.stop() wasn't required for a one time action event; good to use in a cycling function.