🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages Started by Chris Tue, 21 Jun 2005 14:27
JComboBox with ID, Image and Text
#551
Author: Chris
Date: Tue, 21 Jun 2005 14:27
12 lines
1319 bytes
Hello

Does anybody have an example of how to fill a combo box with an object that 
contains an invisible id-value and a JLabel object which is an icon with 
text.

I know that I have to use a DefaultListCellRenderer and I can create a 
combobox with icons and text but I don't get it with the ID value. Can 
somebody help me out with an example?

Thank you
Chris 
Re: JComboBox with ID, Image and Text
#554
Author: Chris
Date: Wed, 29 Jun 2005 11:41
19 lines
1531 bytes
solved it.
The solution was to create a class with the desired values and then use a 
renderer for the combobox.

"Chris" <donotspam@web.li> schrieb im Newsbeitrag 
news:42b822ee$0$14559$79720d31@newsreader.inode.at...
> Hello
>
> Does anybody have an example of how to fill a combo box with an object 
> that contains an invisible id-value and a JLabel object which is an icon 
> with text.
>
> I know that I have to use a DefaultListCellRenderer and I can create a 
> combobox with icons and text but I don't get it with the ID value. Can 
> somebody help me out with an example?
>
> Thank you
> Chris
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads