It’s been quite some time since I wrote in the blog. I went on holiday to Portugal and Spain, and when I came back, the weather was great! I was still in summer mood which made it difficult to get some work done.
In the meantime some nice things happened: Aerith code was released and I purshased two new books.
Since I’ve been developing UI in C++ for one year (check TomTom Home), I now decided to give it a try with Java Swing. I’ve done some UI with Swing while I was studying, but I always used standard components. I also used Eclipse Rich Platform to develop the Multi-Agent Planning Framework Editor.

But for me, it’s customization that makes the difference and the enthusiasm to develop UIs.
After reading a bit from Swing Hacks and looking into Aerith’s code I made a small skinnable application that demonstrates the use transparent buttons and text in a customized title bar and frame:

I took me a few hours to finally make the buttons background transparent. The reason is that the code of “Hack 1” in Swing Hacks did not work for me:
setIcon(icon);
setMargin(new Insets(0,0,0,0));
setIconTextGap(0);
setBorderPainted(false);
setBorder(null);
setText(null)
The next code did work:
setIcon(iconNormal);
setBorder(null);
setContentAreaFilled(false); // This makes the difference of having a transparent background or not.
You can download application jar here. To change the color of the skin click the little tools button!

You can also try this Java Web Start application that I did before. If you run this application using this jar you can drag the title bar, and the frame will not have the default decorations. Unfortunately, and I don’t know why, I could not make that happen when packaging the application to use with Java Web Start, therefore the standard frame will be there.



