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.
int delay = 1000; //milliseconds
ActionListener taskPerformer = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
label.setVisible(false);
}
};
new Timer(delay, taskPerformer).start();
This is my code I want to use now. Eclipse underlines the last line and when they suggest to "remove arguments to match 'Timer()' ". Further it underlines start() and want it to be casted. :S
Can someone help me pls? I've installed the last Java version^^
Thx a lot.