Why are there two Timer classes in Java(one under javax.swing, one under java.util )?

前端 未结 5 1735
轮回少年
轮回少年 2020-12-09 19:59

I am really confused about this . Java has two Timer classes, one under swing , and one under util ... why is that? Which one should I use if I want to simply run X every

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-09 20:45

    Swing version is for rendering swing components. If you just need to time, use util.

提交回复
热议问题