I recently went on a search through the internet for a good program to remind me to occasionally look away from the computer screen (to keep my eyes from drying out while working on the computer for long periods of time). I found a mix of 'free but not quite right for my needs', and 'meets my needs and lots of other people's needs, and therefore somebody feels like it's valuable enough request payment for (nagware)'. Given that, I figured I could code something relatively quickly to meet my needs and try out a new JAVA 6 features in the process. The result: Blinky. It's an app which sits in the System Tray and reminds you to blink based on your activity level at the computer.
What did I learn from coding this? Several things:
- Eclipse 3.2 can work easily with JAVA 6 level code.
- The Full Screen JAVA API requires an active rendering loop (because of a difference in how paint events are delivered).
- JAVA doesn't have an event based way to monitor system wide mouse events.
- System Tray API included in JAVA 6 seems to work great.