Skip to Content

Advent, Advent

Stefan Schneider's picture

This is a student exercise which didn't work out. I planned to implement everything in a nice 2 class environment. The calendar turned out to be so simple that it was more natural to just code it in one class.

I omit I haven't been able to stop...

This is an old school Swing Applet with a grid control, JButtons and images from duke.kenai.com (available under a BSD license).

The applet should work as a standalone application as well. Start it with the following command after the download of the jar file:

java -jar Kalender.jar

The original intention to use this applet as a programming exercise had to be abandoned. I recycled the calendar into Conway's Game of Life which is pretty much the same (At least from the coding point of view).

I was surprised to see that 7711 bytes of the jar file (Game of Life) allowed me to cram the following technology into it:

  • 2503 JButtons
  • 2 icons
  • 6 classes including
    • 1 inner class
    • 3 anonymous classes
  • multi threaded application (2 user threads)
  • works as applet as well as a standalone application

Enjoy!

P.S. I has an easter egg as well. I needed it to test everything without changing the date all the time...