问题
I got a JList, which i want to change height of depended on how many items within the JList.
As seen in the picture, theres alot of components inside a JPanel, which all are alligned at the Y axis. (the JScrollPanel belongs to the JPanel, NOT the JList)
I would like the JList to match its height with the amount of items. A normal JList just stops showing items if it gets too big (unless you apply a JScrollPane).. What i simply want to, is that the JList will get the right size (without hiding items, and without adding a scrollpane).
Best Regards
Oliver

来源:https://stackoverflow.com/questions/23095068/jlist-with-changing-height