Différence entre javax.swing.Timer et java.util.Timer
Résolu
Pulsar360
Messages postés
113
Date d'inscription
Statut
Membre
Dernière intervention
-
Pulsar360 Messages postés 113 Date d'inscription Statut Membre Dernière intervention -
Pulsar360 Messages postés 113 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Java swing timer
- Différence entre tcp et udp - Guide
- Difference entre million et milliard - Accueil - Technologies
- Difference entre mode avion et donnees mobiles - Guide
- Difference entre mo et mb - Forum Matériel & Système
- Difference entre restreindre et bloquer sur instagram - Guide
3 réponses
Il y a aussi javax.management.timer.Timer si tu veux ^^
Plus sérieusement, la différence est expliquée dans la documentation, je cite :
https://docs.oracle.com/javase/7/docs/api/javax/swing/Timer.html
Plus sérieusement, la différence est expliquée dans la documentation, je cite :
https://docs.oracle.com/javase/7/docs/api/javax/swing/Timer.html
In v 1.3, another Timer class was added to the Java platform: java.util.Timer. Both it and javax.swing.Timer provide the same basic functionality, but java.util.Timer is more general and has more features. The javax.swing.Timer has two features that can make it a little easier to use with GUIs. First, its event handling metaphor is familiar to GUI programmers and can make dealing with the event-dispatching thread a bit simpler. Second, its automatic thread sharing means that you don't have to take special steps to avoid spawning too many threads. Instead, your timer uses the same thread used to make cursors blink, tool tips appear, and so on. You can find further documentation and several examples of using timers by visiting How to Use Timers, a section in The Java Tutorial.