Swing NixieClock

Januar 25th, 2010 by Gerrit Diesen Artikel diskutieren »

During my search for some i²c stuff i found these nixie tube clocks. So my first idea was to create such a clock in Swing.
Here is the original i took as master…

To my surprise it was really not a big deal to complete this task and it tooks me around 4 hours until i got my first homebrew swing nixie clock.
Because i received some question on how i did this i will shortly explain it here:

  • First I created a prototype in Adobe Fireworksishot-2.png
  • Second step was creating a javabean and transfer the drawing from Fireworks to Swing
  • Third step was creating a JFrame which contains the clock logic and 6 of the nixie number components (2 hour, 2 minutes and 2 seconds)

And that’s the result:


Of course the second step is the one which takes the most of the time because you have to define all the geometric elements in Swing, pick all the colors from the prototype and create gradients out of it etc.

There is of course still enough place for improvements but for me it looks ok and it was worth the time that i spent on creating it…

So as always i attached the sourcecode as Netbeans project (NixieClock.zip)…enjoy swinging…

If you like follow me on twitter…


4 Antworten Verfasse eine Antwort

  1. Gavin sagt:

    Very Nice!

    I have a question that how do you transfer the drawing from Fireworks to Swing?

  2. Gerrit sagt:

    Well that’s a question people always ask and unfortunately it’s hard to tell in a few sentences. I’m thinking about creating a screencast about how to create a swing component including the transfer from the image to the code.
    I will tweet about it as far as it’s ready, so just follow me on twitter (http://twitter.com/hansolo_) and you will know when it will be finished…

  3. pavan kumar sagt:

    +1 Gavin

    Thanks for the interesting twitter updates

  4. Gavin sagt:

    Especially look forward to it.