How to set white back ground for disabled combo box???

I already tried setBackground.... But it didnt work like textfields.

I guess you're using java, you could try comboboxname.setBackGround(Color.blue);hope it helps

Edited 5 Years Ago by TheHelp: n/a

Well its java section of the forum.... Secondly i have already tried the method, check my question....

JComboBox has two states EDITABLE and Non-EDITABLE

yes that works as JTextFields, because JComboBox is compound JComponents, you can extract (be sure that is L&F sensitive don9t exxpect that definitions for Metal L&F can works on OS MAC.getSystemLook...) JButton of JTextField

all JComponetns has own Model, and for non-editable Components returns JLabel, for Editable JTextField, and if is there applied some InputMask, Formatter, ValidationMask, then returns JFormattedTextField, you can ignore that for your question, both are same methods for your OP about JComboBox

for editable JComboBox should be harder to start from scratch then

myCombo.getEditor().getEditorComponent().setBackground(...);
((JTextField)myCombo.getEditor().getEditorComponent()).setDisabledTextColor(...);
Comments
Mind Blowing....
This article has been dead for over six months. Start a new discussion instead.