File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Combobox Renderer

VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
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

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.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Combobox Renderer
It's not a secret anymore!