By aalmiray
via explodingpixels.wordpress.com
Published: Jul 19 2008 / 12:27
A little while back, I talked about creating a Unified Toolbar. In that post I included a class called an EmphasizedLabel, which was an extension of JLabel that drew emphasis color (i.e. a shadow) underneath the text.
The time came to implement a Unified Toolbar button, and I ran up against the same issue, namely the need to draw emphasized text. This time, I decided not to subclass, but instead to write a custom UI. In fact I liked the simplicity and elegance of the UI implementation so much, that I went back and created an EmphasizedLabelUI to replace EmphasizedLabel, which has the nice side effect of working with any extension of JLabel.
Add your comment