JComboBox Insets using WindowsLAF

Hi all,

I have a combobox that when I use the windows LAF (MS XP Style) the text in it is 0 pixel spaced to the left, resulting ugly, null spaced to the left. How, if possible, can I define an inset to the combo content.

Using the metal LAF this problem doesn't exist.

Best regards

E. Dominguez

SISA Studio Informatica SA

http://www.sisa.ch

[384 byte] By [E.Dominguez] at [2007-9-30 18:48:55]
# 1
override the default ListCellRenderer with your own (or extend the current one) and create an EmptyBorder with the insets you would like..
Sebastiaan_Kortleven at 2007-7-6 21:06:06 > top of Java-index,Archived Forums,Socket Programming...
# 2
_Thank you for answer.Can someone maybe posta a piece of code?And when I return to metal LAF? Is this solution for both metal - win or whatever else also ok?Best RegardsE. Dominguez
E.Dominguez at 2007-7-6 21:06:06 > top of Java-index,Archived Forums,Socket Programming...
# 3
JComboBox box = new JComboBox(data);((BasicComboBoxRenderer)box.getRenderer()).setBorder(new EmptyBorder(0,3,0,3));
Sebastiaan_Kortleven at 2007-7-6 21:06:06 > top of Java-index,Archived Forums,Socket Programming...