JList with changing Height

时间秒杀一切 提交于 2019-12-12 04:57:54

问题



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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!