Actually, there are two Timer classes in the JDK. You and him are using two different classes. The code the OP isusing is correct for the Timer class he is using. With that said, he already posted this in another thread in this forum, at which I answered his question.
No he is not using his Timer class correctly, and he should read the Java Doc.
import java.util.Timer;this the one he is using.
He cannot use it in that way.
You are thinking of javax.swing.Timer which he might want to use but is not using.
He will get a compile error with his code because of an Invalid Constructor call.
You did not need the unnecessary sub class. but if you did want to use it then you should have put this in the Timer constructor:
time = new Timer(5,new TimerListener());
putting the this keyword means that nothing will be rendered due to the fact that in your actionPerformed method in the Board class was empty.
Hope it helped
You should actually avoid using 'this' in constructors because it is one of the conditions that can cause Java to leak because it's not fully initialized so it is best to get out of that bad habit. A subclass is a good way to avoid it, but a Factory is better but well beyond what he's doing. However, you're right he used the subclass incorrectly.