Drawing in code (Part 2)

Januar 28th, 2010 2 Kommentare »

Drawing in code:

Part 2 (Transfer the prototype into swing):

So you will find out that this is not magic but only drawing the same elements that we used in the vector drawing programm but now in their Java2D representations. We just create a buffered image with the same size as the prototype. So we could use the same pixelcoordinates for the shapes and gradients in swing.

In Adobe Fireworks you have the ability to move the mousecursor over a pixel and you could see the pixelcoordinate and it’s color values in a window, this is nothing special but it’s a needed functionality to grab the positions of all the shapes and the colors of the gradients from the prototype.


Keep in mind that i won’t show how i pick all these coordinates and colors, but you have to do this
ishot-3.png




Step 1. – 5.

First coding the vertical pill which is in principle just a rounded rectangle with a corner radius of it’s width.

After that we code the rounded rectangle that will represent the bottom if the tube.

Now follows the small ellipse on the top.
After all we combine all of these shapes into one which is really easy in swing.

Just take a look at the code:

/**
* Tutorial Step 1. - 5.
* Create the glass tube form
*/
final java.awt.geom.Area TUBE = new java.awt.geom.Area(new java.awt.geom.RoundRectangle2D.Float(1, 8, 86, 136, 86, 86));
final java.awt.geom.Area TUBE_BOTTOM = new java.awt.geom.Area(new java.awt.geom.RoundRectangle2D.Float(1, 75, 86, 70, 30, 30));
final java.awt.geom.Area TUBE_TOP = new java.awt.geom.Area(new java.awt.geom.Ellipse2D.Float(38, 0, 12, 18));
TUBE.add(TUBE_TOP);
TUBE.add(TUBE_BOTTOM);






Step 6.

Create and apply a horizontal gradient to the tube.


/**
* Tutorial Step 6.
* Create and apply the left to right gradient
*/
final java.awt.geom.Point2D START_LEFT = new java.awt.geom.Point2D.Float(0,0);
final java.awt.geom.Point2D STOP_RIGHT = new java.awt.geom.Point2D.Float(86,0);

final float[] FRACTIONS_LEFT_TO_RIGHT =
{
    0.0f,
    0.15f,
    0.4f,
    0.6f,
    0.75f,
    1.0f
};

final java.awt.Color[] COLORS_LEFT_TO_RIGHT =
{
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.5f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.3f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.1f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.1f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.3f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.5f)
};

final java.awt.LinearGradientPaint LEFT_TO_RIGHT_GRADIENT = new java.awt.LinearGradientPaint(START_LEFT, STOP_RIGHT, FRACTIONS_LEFT_TO_RIGHT, COLORS_LEFT_TO_RIGHT);

g2.setPaint(LEFT_TO_RIGHT_GRADIENT);
g2.fill(TUBE);







Step 7.

Now create and apply a vertical gradient from top to bottom to the same tube shape.


/**
* Tutorial Step 7.
* Create and apply the top to bottom gradient
*/
final java.awt.geom.Point2D START_TOP = new java.awt.geom.Point2D.Float(0,0);
final java.awt.geom.Point2D STOP_BOTTOM = new java.awt.geom.Point2D.Float(0,146);

final float[] FRACTIONS_TOP_TO_BOTTOM =
{
    0.0f,
    0.9f,
    1.0f
};

final java.awt.Color[] COLORS_TOP_TO_BOTTOM =
{
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f),
    new java.awt.Color(0.0f, 0.0f, 0.0f, 0.6f)
};

final java.awt.LinearGradientPaint TOP_TO_BOTTOM_GRADIENT = new java.awt.LinearGradientPaint(START_TOP, STOP_BOTTOM, FRACTIONS_TOP_TO_BOTTOM, COLORS_TOP_TO_BOTTOM);

g2.setPaint(TOP_TO_BOTTOM_GRADIENT);
g2.fill(TUBE);







Step 8. – 9.

So let’s add the side light effect. So we code two roundedrectangles and subtract one from another. Let’s take a look at the code:


/**
* Tutorial Step 8. - 9.
* Create the side light reflection shape
*/
final java.awt.geom.Area SIDE_LIGHT_EFFECT = new java.awt.geom.Area(new java.awt.geom.RoundRectangle2D.Float(3, 43, 36, 99, 18, 18));
final java.awt.geom.Area EFFECT_SUB = new java.awt.geom.Area(new java.awt.geom.RoundRectangle2D.Float(7, 37, 36, 105, 18, 18));
SIDE_LIGHT_EFFECT.subtract(EFFECT_SUB);



et voila…that was easy






Step 10.

Now we have to create and apply a horizontal gradient for this side light effect.


/**
* Tutorial Step 10.
* Create and apply the side light gradient
*/
final java.awt.geom.Point2D SIDE_LIGHT_EFFECT_START = new java.awt.geom.Point2D.Float(3, 0);
final java.awt.geom.Point2D SIDE_LIGHT_EFFECT_STOP = new java.awt.geom.Point2D.Float(13, 0);

final float[] SIDE_LIGHT_EFFECT_FRACTIONS =
{
    0.0f,
    1.0f
};

final java.awt.Color[] SIDE_LIGHT_EFFECT_COLORS =
{
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.5f),
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f)
};

final java.awt.LinearGradientPaint SIDE_LIGHT_EFFECT_GRADIENT = new java.awt.LinearGradientPaint(SIDE_LIGHT_EFFECT_START, SIDE_LIGHT_EFFECT_STOP, SIDE_LIGHT_EFFECT_FRACTIONS, SIDE_LIGHT_EFFECT_COLORS);

g2.setPaint(SIDE_LIGHT_EFFECT_GRADIENT);
g2.fill(SIDE_LIGHT_EFFECT);







Step 11.

Next thing to code is the ellipse on top of the tube which will be the top light reflection.


/**
* Tutorial Step 11.
* Create the top light effect ellipse
*/
final java.awt.geom.Ellipse2D TOP_LIGHT_EFFECT = new java.awt.geom.Ellipse2D.Float(17, 11, 52, 21);







Step 12.

Now we have to create and apply the gradient for this top light reflection.


/**
* Tutorial Step 12.
* Create and apply the top light gradient
*/
final java.awt.geom.Point2D TOP_LIGHT_EFFECT_START = new java.awt.geom.Point2D.Float(0, 11);
final java.awt.geom.Point2D TOP_LIGHT_EFFECT_STOP = new java.awt.geom.Point2D.Float(0, 32);

final float[] TOP_LIGHT_EFFECT_FRACTIONS =
{
    0.0f,
    1.0f
};

final java.awt.Color[] TOP_LIGHT_EFFECT_COLORS =
{
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.5f),
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f)
};

final java.awt.LinearGradientPaint TOP_LIGHT_EFFECT_GRADIENT = new java.awt.LinearGradientPaint(TOP_LIGHT_EFFECT_START, TOP_LIGHT_EFFECT_STOP, TOP_LIGHT_EFFECT_FRACTIONS, TOP_LIGHT_EFFECT_COLORS);

g2.setPaint(TOP_LIGHT_EFFECT_GRADIENT);
g2.fill(TOP_LIGHT_EFFECT);







Step 13.

This one is ease, just a small ellipse on top.


/**
* Tutorial Step 13.
* Create the small light effect ellipse
*/
final java.awt.geom.Ellipse2D SMALL_TOP_LIGHT_EFFECT = new java.awt.geom.Ellipse2D.Float(39, 3, 4, 6);







Step 14.

And again create and apply the right gradient for the reflection effect.


/**
* Tutorial Step 14.
* Create and apply the small light effect gradient
*/
final java.awt.geom.Point2D SMALL_TOP_LIGHT_EFFECT_START = new java.awt.geom.Point2D.Float(0, 3);
final java.awt.geom.Point2D SMALL_TOP_LIGHT_EFFECT_STOP = new java.awt.geom.Point2D.Float(0, 9);

final float[] SMALL_TOP_LIGHT_EFFECT_FRACTIONS =
{
    0.0f,
    1.0f
};

final java.awt.Color[] SMALL_TOP_LIGHT_EFFECT_COLORS =
{
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.3f),
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f)
};

final java.awt.LinearGradientPaint SMALL_TOP_LIGHT_EFFECT_GRADIENT = new java.awt.LinearGradientPaint(SMALL_TOP_LIGHT_EFFECT_START, SMALL_TOP_LIGHT_EFFECT_STOP, SMALL_TOP_LIGHT_EFFECT_FRACTIONS, SMALL_TOP_LIGHT_EFFECT_COLORS);

g2.setPaint(SMALL_TOP_LIGHT_EFFECT_GRADIENT);
g2.fill(SMALL_TOP_LIGHT_EFFECT);







Step 15.

We are coming slowly to the end, now creating the small rectangle for the stripe reflection.


/**
* Tutorial Step 15.
* Creating the rectangle for the stripe light effect
*/
final java.awt.geom.Rectangle2D STRIPE_LIGHT_EFFECT = new java.awt.geom.Rectangle2D.Float(13, 46, 62, 1);







Step 16.

Finally create and apply the gradient for the stripe reflection.


/**
* Tutorial Step 16.
* Create and apply the stripe light effect gradient
*/
final java.awt.geom.Point2D STRIPE_LIGHT_EFFECT_START = new java.awt.geom.Point2D.Float(13, 0);
final java.awt.geom.Point2D STRIPE_LIGHT_EFFECT_STOP = new java.awt.geom.Point2D.Float(75, 0);

final float[] STRIPE_LIGHT_EFFECT_FRACTIONS =
{
    0.0f,
    0.5f,
    1.0f
};

final java.awt.Color[] STRIPE_LIGHT_EFFECT_COLORS =
{
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f),
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.5f),
    new java.awt.Color(1.0f, 1.0f, 1.0f, 0.0f)
};

final java.awt.LinearGradientPaint STRIPE_LIGHT_EFFECT_GRADIENT = new java.awt.LinearGradientPaint(STRIPE_LIGHT_EFFECT_START, STRIPE_LIGHT_EFFECT_STOP, STRIPE_LIGHT_EFFECT_FRACTIONS, STRIPE_LIGHT_EFFECT_COLORS);

g2.setPaint(STRIPE_LIGHT_EFFECT_GRADIENT);
g2.fill(STRIPE_LIGHT_EFFECT);






Prototype Swing
ishot-23.png ishot-4.png



Conclusion:

As you can see transfering an image to swing is not rocket-science. To achieve this you have to get a feeling for drawing effects like light reflections, shadows etc. (and i’m really not a designer).

So my recommendation is follow design blogs, play with your drawing program or just walk around with open eyes and take pictures of intersting things…there are so many of them…



Please find the related Netbeans project here DrawInCode.zip


Now enjoy swinging…

 

Drawing in code (Part 1)

Januar 28th, 2010 Leave your comment »

Drawing in code:

Part 1 (Drawing the prototype):

After i published my little fun swing nixieclock i got a lot of requests on how i transferred the image into swing.
Because i remember when i was starting swing development i asked myself the same questions when i saw the amazing work of swing/design guru’s like Kirill Grouchnikov, Romain Guy, Joshua Marinacci, Chet Haase, and others.
Well in the meantime i figured out how to do this and find a workflow that i would like to share here. By the way this is really nothing compared to the things these swing/design guru’s are able to do.

So here we go, first of all i have one good advice for you “Know your tools”,
which means not only java and swing but also your graphics program.

So i’m using Adobe Fireworks for that but you could also use any other kind of graphics program like Adobe Photoshop, Gimp, Inkscape etc.


I will start the tutorial with the drawing of the tube in Adobe Fireworks because it makes coding in swing so much easier if you know how to draw it in a graphics program. So the first part will be focussed on the drawing and the second part will explain how to draw all the different points in java2d/swing:

So we would like to create a nixie glass tube in swing that should look similar to this but to keep it simple i will focus only on the glass tube itself without any numbers or logic etc.

Once you understand the way of doing this you could easily adopt these technique to everything you would like to do (if there is a equivalent in swing).
NixieTubeVorlage.jpg
Step 1.

Draw a vertical pill which will be the main body of the tube.
ishot-1.png


Step 2.

Draw a rounded rectangle that will represent the bottom if the tube.
ishot-2.png


Step 3.

Merge this two shapes into one shape.
ishot-3.png


Step 4.

Now draw a little ellipse on top of the tube.
ishot-4.png


Step 5.

Again merge the two shapes into one.
ishot-5.png


Step 6.

Fill the tube with a horizontal gradient from left to right where you use black with different values for transparency.


Position Transparency
0% 60%
15% 20%
75% 20%
100% 60%
ishot-6.png
ishot-7.png


Step 7.

Now fill the same tube shape again with a vertical gradient from top to bottom again using black with different values for transparency.


Position Transparency
0% 0%
90% 0%
100% 60%
ishot-10.png
ishot-9.png


Step 8.

Now we will add some reflection effects. First of all a side light reflection. Therefor create a vertical rounded rectangle. Than create a second rounded rectangle which is slightly higher than the first one and place it a little bit shifted to the right of the first one.
ishot-11.png


Step 9.

Subtract the second rectangle from the first one.
ishot-12.png


Step 10.

Now fill this shape with a horizontal gradient from left to right with white of with different values for transparency.


Position Transparency
0% 60%
100% 0%
ishot-14.png
ishot-13.png


Step 11.

Create a ellipse on top of the tube which will be the top light reflection.
ishot-15.png


Step 12.

Fill this ellipse with a vertical gradient from top to bottom with white with different values for transparency.


Position Transparency
0% 60%
100% 0%
ishot-17.png
ishot-16.png


Step 13.

Next add a small ellipse on the very top of the tube.
ishot-18.png


Step 14.

Fill this ellipse also with a vertical gradient from top to bottom with white with different values for transparency.


Position Transparency
0% 60%
100% 0%
ishot-19.png


Step 15.

Finally create a small horizontal rectangle on the top of the tube.
ishot-20.png


Step 16.

Fill this rectangle with a horizontal gradient from left to right with different values for transparency


Position Transparency
0% 0%
50% 60%
100% 0%
ishot-22.png
ishot-21.png


That’s it… so we created a nice looking glass tube just with combination of some shapes and gradients.


In the second part of the tutorial i’ll explain the representation of all these shapes and gradients in code…so hang on…
ishot-23.png

Part two: http://www.jug-muenster.de/drawing-in-code-part-2-2-384/

 

Talklets Münster: JSF 2.0 mit Matthias Wessendorf und Bernd Bohmann

Januar 27th, 2010 1 Kommentar »

UPDATE 2: Falls Ihr die Demo oder die Folien noch mal ansehen wollt:

Folien als PDF oder bei slideshare

Man braucht Apache OpenWebBeans (trunk), den gibts hier:
http://svn.apache.org/repos/asf/openwebbeans/trunk/
(mvn install)

Dann MyFaces das BETA (noch nicht raus). Trunk ist hier:
http://svn.apache.org/repos/asf/myfaces/current20/
(mvn install)

Demo ist hier:
http://facesgoodies.googlecode.com/svn/MS/trunk/pom.xml
starten => mvn -Pmyfaces

UPDATE: Es gibt eine “Notfall” Nummer falls jemand Probleme hat den Leo18 zu finden: 0173/4711729

Am Mittwoch dem 27.01.2010 finden im Hörsaal Leo18 auf dem Leonardocampus (am Johann-Krane-Weg zwischen der Eishalle und dem Technologiepark http://tinyurl.com/jugmsleo18) im Rahmen unserer Vortragsreihe “Talklets Münster” der nächste Vortrag statt.

Vortrag:
JavaServer Faces 2.0
Seit dem Sommer 2009 ist die JSF 2.0 Version “final”. Der Vortrag stellt die wesentlichen Bestandteile der neuen Version vor. Anschließend gibt es einen aktuellen Status zu Apache MyFaces 2.0, dass eine Alternative zur SUN RI (Mojarra) darstellt.

Referenten:

Matthias Wessendorf
arbeitet für Oracle an einer Server-Side-Push (aka Comet) Lösung für die ADF Faces JSF Bibliothek. Er ist PMC Chair von Apache MyFaces. Matthias blogt regelmäßig auf http://matthiaswessendorf.wordpress.com und twittert unter @mwessendorf

Bernd Bohmann
arbeitet für die IRIAN Deutschland GmbH als Software-Entwickler und Berater. Er ist ein PMC Mitglied der Apache MyFaces-Projekt.

Agenda:
| 18:30 | Einlass
| 19:00 | Vortrag: JavaServer Faces 2.0

Damit wir in etwa die Anzahl der Besucher abschätzen können wäre es schön wenn sich alle Interessenten unverbindlich unter http://tinyurl.com/talkletsanmeldung anmelden würden.

 

Swing NixieClock

Januar 25th, 2010 4 Kommentare »

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 Fireworks

    ishot-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:

ishot-1.png












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…

 

Java Usergroup Stammtisch: 13.01.10

Januar 13th, 2010 Leave your comment »

Die Java Usergroup Münsterland freut sich den ersten Stammtisch in 2010 einen Stammtisch anzubieten. Für alle an Java, Softwareentwicklung und aktuellen Trends interessierte Personen – auch PHP, Ruby on Rails Entwickler sind natürlich willkommen!

Der Java Treff für Münster, Osnabrück und Umgebung findet am Mittwoch dem 13.01. ab ca. 18:30 Uhr im Cuba Nova statt. Das Cuba Nova befindets ich in der Achtermannstrasse in der Nähe vom Hauptbahnhof. (3 Minuten zu Fuß, wenn man langsam geht.). » Mehr: Java Usergroup Stammtisch: 13.01.10

 

Pro JPA 2 (Book review)

Januar 8th, 2010 1 Kommentar »

Mike Keith and Merrick Schincariol authored a book which focuses on JPA 2, the Java persistence API which is now included in the Java EE 6 specification.

JPA has its origins in object relational mapping tools like hibernate, JDO or TopLink. While JPA was originally created as a standard for the Java enterprise stack, it did not take much time until it was was also used in the Java SE environment. JPA is easy to use and helpful if integrated into Desktop applications whenever object relational mapping  makes sense.

While JPA is covered in Java EE books as well, Pro JPA 2 only focuses on JPA and provides a profound coverage of the topic, attracting all kinds of developers. The books does not require previous knowledge of JPA 1 or other object relational mapping technology. A basic understanding of database systems, SQL and JDBC is required, but the required knowledge can be achieved by using Wikipedia or any introductory article.

The book motivates the usage of ORM (object relational mapping) software by showing the differences to JDBC, proprietary APIs, EJBs, and JDO. After reading the first pages, you are already able to write your first JPA 2 application, getting an overview of the various parts of JPA, configuration and running the application in a Java SE environment. This is especially useful for beginners, who are able to understand how the different parts operate  and are encouraged to try out the technology.

The third chapter provides a short introduction to Java EE and explains the role of JPA in the context of an enterprise application with an emphasis on transaction and dependency management. The following chapters focus on the many aspects of ORM, many UML diagrams help understanding the context. Advanced topics like caching, deployment, packaging and testing are covered as well, contributing to the good overall impression of the book.

The last chapter helps users who need to migrate from CMP entity beans, JDBC or other ORM solutions to JPA 2 and introduces related enterprise design patterns.

In a nutshell, the authors manage to satisfy both the needs of novice and experienced developers with a good introduction and an in-depth coverage. » Mehr: Pro JPA 2 (Book review)

 

Swing Apollo space program mission timer

Januar 2nd, 2010 2 Kommentare »

Still on vacation i took the chance to spent some time on watching movies i ordered some time ago and so i watched several movies related to the Nasa moon landing program which lead to the landing on the moon in july 20th 1969.
In the movie MoonShot which tells the story of Apollo 11 and it’s flight to the moon in 1969 i was fascinated by the board computer of the command module and took a picture of the mission timer which looked great to me…

MissionTimerOriginal.jpg

Because i love coding in Java and those things could be easily done in Java’s swing framework i decided to create a little mission timer by myself and that’s a picture of the result

MissionTimerJava.png











I don’t know if it’s useful to anybody but for those of you who like it, i added the source as netbeans project here MissionTimer.zip

You will find two classes in the project, a JFrame and a TimerPanel. (If you would like to use the TimerPanel in another project you just can drag’n drop the TimerPanel class onto a JFrame, JPanel etc.)

To start or stop the timer you just have to click on the panel with the left mousebutton. To reset the panel just doubleclick on the panel.

Enjoy it and keep swinging…

 

Java Treff Münster: 30.12.09

Dezember 29th, 2009 Leave your comment »

Auch zwischen Weihnachten und Neujahr lassen wir uns nicht aufhalten: Für alle an der Java Technologie und Softwareentwicklung begeisterten ist der nächste Java Stammtisch genau das richtige. Am Mittwoch dem 30.12. treffen wir uns im Cuba Nova ab ca. 18:30 Uhr, Achtermannstraße in der Nähe des Hauptbahnhofs (3 Minuten zu Fuß, wenn man langsam geht.).

Parkmöglichkeiten und Anfahrt zum Java Usergroup Münster Treff: Parkhaus Engelenschanze ist am nächsten gelegen. Ansonsten empfehlen wir die Anreise mit dem Rad oder öffentlichen Verkehrsmitteln – insbesondere für Weizen-Fans. (Google Maps Link)

 

Modular Java (Buch)

Dezember 24th, 2009 Leave your comment »

Das Buch “Modular Java” von Craig Walls erklärt auf praktische Weise, wie modulare Java Anwendungen auf Basis des Spring Framework und OSGI entwickelt werden.

Das Buch setzt die hohen Standards der Pragmatic Bücher fort. Bücher aus der Pragmatic Books Serie präsentieren relevante Inhalte so in einer ansprechenden Form, dass sie zum direkten ausprobieren motivieren.
OSGI verspricht die in Softwareprojekten auftretende Komplexität unter Kontrolle zu halten. Dies wird dadurch erreicht, dass einzelne Module isoliert voneinander gehalten werden, und loose Kopplung mittels definierter Dienstenutzung und Angebot eigener Dienster gefördert wird. Man kann sich OSGI als eine Ausprägung von Service oriented architecture (SOA) innerhalb der Java Virtual Machine vorstellen. Die Wurzeln von OSGI stammen von embedded Umgebungen, zwischenzeitlich ist OSGI auch Dank Desktopanwendungen wie Eclipse, das auf OSGI setzt, populär geworden. Nach embedded und der Desktop kommt OSGI nun auch auf den Server. » Mehr: Modular Java (Buch)

 

Custom swing component

Dezember 21st, 2009 6 Kommentare »

During my vacation i’m playing around with the SunSPOT’s from Sun Microsystems which are fantastic little gadgets. (Please find more information about them here.)
I attached a combined temperature/humidity sensor to one of my spots and used xmpp protocol (with smack library) to communicate with my SunSPOT host application from wherever I am.
To visualize the measured values I needed something sexy and because there was nothing ready to go I created two little “instruments” that I would like to share with you.

And here they are:

First a gauge:

ishot-2.png

Second Java Swing component is a display (yes I know it’s inspired by Apples iTunes):

ishot-1.png

Third custom Swing component a combination of the display with a led panel:

ishot-3.png

I think I’ll have to do some work at the 3d-effect of the rounded rectangle but as a first prototype they looked ok to me.

You can find my presentation on custom Swing components here, the Netbeans project for the components in the article can be downloaded here: Instruments, the Netbeans project for the application from the slides is here: SD.zip

If you are interested, please leave a comment…