This post originated from an RSS feed registered with Java Buzz
by Scott Delap.
Original Post: Desktop Java Live: Foiled by Swing UI Delegates Part II
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
You may remember last week's episode ... Custom ScrollBarUI ... Not So Fast. This week our hero (Desktop Java Live author) again attempts to battle the evil UI delegate empire.
My quest to provide UI delegate examples for the look and feel chapter of the book was foiled again this last week. I'm beginning to understand why other Swing books change the scrollbar color or the button border. The week started out promising. I rolled together a nice animated pulsating focus effect for JButtons similar to Aqua on OS X. Then I thought I'd try something more difficult. I thought "hey why not put a JTable as the popup in a JComboBox". Upon further investigation this turned out to be non trivial using the BasicComboBoxUI as a starting point. The implementation doesn't use a standard JPopup. Instead it uses a special ComboBoxPopup with explicitly exposes a getList() method. Both the delegate and the ComboBoxPopup implementation are highly dependent on the existence of this list object. I would end up rewriting the entire delegate from scratch to get everything to work properly. So this being the case, does anyone have a particular UI delegate related issue they would like me to solve as an example?