Can we have custom Listbox entry fields?

I was wondering if listbox entry fields could be something else other than a button?

I wonder if it could have customisable elements on each entry, like checkbox, textfield, a few buttons etc, may be a panel or container with several elements disposed in a single line?

So instead of a button it would be a container (or panel), that we could customize.

The entry data filling/displaying would be provided by an interface with applyEntryValue(Object... aobj), from the stored objects on the list model

Yeah, CellRenderer returns Panel. I can be anything and doesn’t have to be a Button. Just create your own custom CellRenderer that returns something else.

I think DefaultCellRenderer uses Button by default only because it already has highlighting and (possibly) click animation (depending on styling). But there is no requirement for it to be a Button.

1 Like