So, basically I've made a stopwatch GUI application which I want to use for tracking time I spend in front of my PC. I want my stopwatch to stop counting when I lock my PC and resume counting when I unlock my PC. How can this be achieved with Java?
Thanks!