Reputation: 9394
I have a combobox in LWUIT and when I use my arrows up and down I can't see which item is selected so How can I change the background color of combobox item selected in LWUIT
Upvotes: 2
Views: 430
Reputation: 9394
Finally I found the answer, I have used Cell Renderer to be able to change the Style of ComboBox Item and also I have used Look and Feel to be able to change the arrow Icon and replace it with my Icon
genderCB.setListCellRenderer(my defined cell renderer);
Blockquote
LookAndFeel lf = UIManager.getInstance().getLookAndFeel();
try {
((DefaultLookAndFeel) lf).setComboBoxImage(Image.createImage(image));
} catch (Exception ex) {
ex.printStackTrace();
}
Upvotes: 1