James Williams
LinkedInMastodonGithub

Hello World Groovy Desklet

Tags: Groovy

Totally fascinated by AB5k, I ended up working on a Groovy Desklet late into the night. One of the weird spots is that the DeskletContext doesn't obey an explicit

setSize(...)

call. I had to follow the example of the included desklets and use

setPreferredSize(...)

instead.

Another sticking point was the fact that the classes from the groovy embedded jar had to be put into the desklet to run in AB5k. Hopefully in upcoming versions, it will be included in the webstart download.

The desklet doesn't do much at all. It contains a couple labels and a button. One label shows the time the desklet was started or stopped and the other indicates how many times the button was clicked.