Amira Elsayed Ismail
Amira Elsayed Ismail

Reputation: 9394

Combobox selection highlight in LWUIT

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

Answers (2)

Amira Elsayed Ismail
Amira Elsayed Ismail

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

Mun0n
Mun0n

Reputation: 4437

Use the ComboBoxUIID ComboBoxFocus Selected style.

Upvotes: 1

Related Questions