Re: Timer event appears to move window
- From: "Filip Larsen" <filip.larsen@xxxxxxxxx>
- Date: Wed, 27 Jul 2005 00:37:24 +0200
Ed wrote
> The StatusBar code contains the following in the initialisation code:
> statusTimer=new Timer();
Note that there are two standard timer implementations, java.util.Timer
and javax.swing.Timer. Whenever you use timers in Swing to update some
part of the GUI you almost always want the later one since it makes
callback from the event dispatcher thread.
If you really want to update a Swing component from the callback of a
java.util.TimerTask you must in general use something like
java.awt.EventQueue.invokeLater() to ensure Swing thread safety. See
javax.swing.Timer for documentation and links on all this.
Regards,
--
Filip Larsen
.
- References:
- Timer event appears to move window
- From: Ed
- Timer event appears to move window
- Prev by Date: Re: Fixed size font
- Next by Date: Re: Timer event appears to move window
- Previous by thread: Timer event appears to move window
- Next by thread: Re: Timer event appears to move window
- Index(es):
Relevant Pages
|