Archive for the 'Programming' Category

The Calendar v2.0 released (updated)!

Wednesday, November 19th, 2008

Update: the version available from this page is now v2.1, and includes debugging info messages (can be turned on in Settings).

By popular request, I have made a new version of my Windows Sidebar Gadget for Google Calendar. The following (requested) features are included in this new version:

  • Multiple calendar support!
  • Option for using Google Calendar’s color info for coloring the calendar items
  • Option for using 12-hour (am/pm) time format, instead of 24-hour (though why anyone would NOT want to use 24-hour format is a mystery to me… oh well :) )
  • Slight adjustment of the background image that makes the gadget align a bit better with the sidebar

Download the gadget here.

Setting up the multiple calendar support is fairly straight-forward, just go to the gadget’s settings form, enter your credentials, and click the ‘retrieve’ link. The list below that link will now show the calendars associated with your account, and you can select the ones you would like to show up in the gadget.

For historical reasons, I should provide a link to the original version.

Let me know what you think!

Windows Vista Sidebar gadget for Google Calendar

Friday, August 22nd, 2008

N.B.: version 2.0 of this gadget is now available!

I had spent some time searching for a good Windows Vista sidebar gadget that displayed a few upcoming Google Calendar events, when I noticed somewhere that, in fact, sidebar gadgets are actually just HTML/CSS/JavaScript snippets. Because I could not find any really good gadget that did what I wanted, I decided to write my own. I hereby proudly present: The Calendar v1.0 .

It will display the first six upcoming Google Calendar events, along with their start and end dates and times, displaying the latter whenever this is appropriate. Each event’s title provides a link to the appropriate Google Calendar event detail page. When you hover your mouse over the gadget, a small calendar icon will appear in the bottom right corner of the gadget. Clicking it will bring up Google Calendar in your default browser.

Before the first use, you must enter your @gmail.com address and password and a desired update interval in the gadget’s settings form.

Below are some screenshots.

The last screenshot shows two hovering functions. First, when hovering over the title of an event, its full title is shown in a tooltip. Second, when hovering anywhere over the gadget, a calendar icon is shown that links to Google Calendar. Note that Windows for some reason does not include the cursor in screenshots, so that is why there is no ‘hand’ shown in the picture.

Let me know what you think! Of course, it is free software and open source, so distribute it as you like, as long as you give me (Eelke Spaak) the credit of developing it and always provide a link to my website. Since .gadget files are actually ZIP archives, you can just extract it with WinZip or whatever to obtain the source scripts.

N.B.: version 2.0 of this gadget is now available!

JFileField Swing component

Sunday, May 4th, 2008

While programming simple Java swing applications, I often found myself writing a combination of a JTextField and a JButton (”Browse…”) when prompting the user to select a file. The JButton would then bring up a JFileChooser and the path to the selected file would show up in the text field. To make this easier, I have written a simple JFileField class that encapsulates the browse functionality. Its source (JFileField.java) and Javadoc (JFileField.html) are available.

Note that the component was originally created in the NetBeans IDE 6.0, so some remnants of the NetBeans form editor are still present in the Java source. This does not matter, however, since NetBeans generates highly portable code.