wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Combobox Renderer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Combobox Renderer" Watch "Combobox Renderer" New topic
Author

Combobox Renderer

VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
Hi,
I am getting a problem using Renderer for Combobox - even though I explicitly set the selectedIndex to -1 or selectedItem to null, it is still displaying some item in the list.
Please help me.
Thanks in advance.
VIJAY Yadlapati
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Post the code for your renderer... I'm betting this problem is caused because the renderer doesn't explicitly set the value each time, so if there's some problem it just uses the last value it contained. But I'd have to see the code to be sure.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Combobox Renderer