So I have googled some minutes how to use the timer and found some helpfull threads here. But when I want to use the suggested code Eclipse shows me always an error.
your import is wrong there correct that
change
java.util.Timer
to
javax.swing.Timer