How should I implement a function like that on my Swing editor?
I was thinking of a thread started on a releaseKey event. This thread should have a timer of a second. Every time I have the releaseKey I either start the thread or just reset the timer if it is already running.
I’m not convinced though. It seems like too heavy on the UI.
How should I do it?
How should I implement a function like that on my Swing editor? I was
Share
A Timer starting/stopping every second is not a big weight on the UI at all. The “building” is what is going to possibly take some time. I think looking for a pause in keystokes is a fine solution.