Tuesday, July 25, 2006

Remembering to Blink

So, my day job consists mostly of writing Enterprise java Application/architectures (spring/aspectj/hibernate/j2ee/etc) with web front ends. With the occasional exception (last year I worked on a webstart based swing project which talked to a j2ee server backend), I rarely get to dive into what's new for java desktop applications.

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:
  1. Eclipse 3.2 can work easily with JAVA 6 level code.
  2. The Full Screen JAVA API requires an active rendering loop (because of a difference in how paint events are delivered).
  3. JAVA doesn't have an event based way to monitor system wide mouse events.
  4. System Tray API included in JAVA 6 seems to work great.
Here's a link to the app/src: Blinky

2 comments:

Jason said...

I offered to come by and punch you in the face every 30 minutes.

Matt said...

+1 funny