JComboBox item diasable projlem??

View: New views
1 Messages — Rating Filter:   Alert me  

JComboBox item diasable projlem??

by Yatin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

 hello to all folks out there,

i v much new to this nabble site.
i want to write a simple swing jcombobox prog.
in that some of the items are disable, and if mouse is click on that the combo shouldn't roll up combobox it remain same and also if key traversal is made those selected item doesn't get selected, the selection should jumped to next highlighted item as it encounter the disable item.

i don't want the entire prog here but can anybody tell me wt should be the logic need to be implemented for above same.

i have tried the keyborad traversal but it is one way from top to bottom.

i'm using action listener with combo. it don't work with keylistener (i'm not getting the jumped effect with it) but i need to keep track of vk_up and vk_down key in action listener and these keys are availabe with keylistener.
also used hasmap to make some item disable in combo.
can we change the color of comboitem those are disable.

can forward any userful link,
thanx in advance,
LightInTheBox - Buy quality products at wholesale price