Re: Different height at JComboBox editor and renderer




Babu Kalakrishnan wrote:

Unfortunately the answer is no. This (in my opinion) is one of the big
drawbacks of the swing framework - there's no single point where you
can override a certain behaviour in the UI area and allow it to
propagate to all look-n-feels.

In my opinion you'd be better off putting your custom sizing behaviour
in either a customized JComboBox subclass - (Or simply call
setPreferredSize on it). While the default behaviour of a JComponent is
to (rightly) ask the UI delegate to compute the preferred sizes, it
normally honors the preferred sizes set by the application at the
component level.

BK

Doing it the way you suggested works much better. Thanks for your help!

.