don't do that
I created a JComponent and every 20 milliseconds it is repainted
because latency from Native OS are always more than 63ms, yes is possible to paint every 50ms but you have to implements DirtyRegion to avoids GUI's freeze or RepaintManagerError, start with 100ms, better would be 250ms
you have to stop ScheduledThreadPoolExecutor, same as you start ....,
if you want to play with Executor, then look for Monitor
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224