So far, I've tried simply going through my labels and adding each one to the list's list model with:
listModel.addElement(label);
So this works, but it simply gives a string representation of the label rather than the actual label.
Basically, is it possible to have a JList of JLabels? If not, then what's a good way to have a scrollable list of JLabels that I can update?
JList
, JTable
, JComboBox's popup
return by default JLabel / JComponent
from the Renderer
, then there is no reason to put those JComponents
types to the JList
(in this case)
but it simply gives a string representation of the label rather than the actual label