padding in a ComboBox
hi !i need to set the padding inside a JComboBox (just like as in HTML Table's cellpadding).how can i accomplish that ?Thanks.
[155 byte] By [
gkjogia] at [2007-11-27 5:09:06]

# 1
by using a cell renderer...DefaultListCellRenderer r = new DefaultListCellRenderer();r.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));combo.setRenderer(r);
# 4
i did the following
ComboBoxEditor ced = combo.getEditor();
TextField temp = (TextField)ced.getComponent()
temp.setBorder(new EmptyBorder(5,5,5,5));
temp.setBackground(Color.GREEN);
The setting of color works, but the padding did not. My problem is that in ComboBox if first character is small case, its hard to make out.