Are you talking about the java SE Timer classes?
Read the API doc and see the tutorial:
How to Use Swing Timers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)