Displaying large amount of data with JList?

前端 未结 3 624
再見小時候
再見小時候 2021-01-24 08:45

I have a JList, wich must display more than 3000 items. I wish to have \"visible\" around 100 items in the list, and when you scroll and getting close to the end (or begining) o

3条回答
  •  孤独总比滥情好
    2021-01-24 09:36

    The list is rendering only the visible part. So there is no overhead from this point of view. If you want lazy loading - use custom models.

    From this page :
    You can write your own class that extends AbstractListModel or AbstractTableModel so that you can provide the needed data when necessary. The following example shows the usage of AbstractTableModel.

提交回复
热议问题