使用JList显示大量数据? [英] Displaying large amount of data with JList?

查看:94
本文介绍了使用JList显示大量数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JList,必须显示超过3000个项目。我希望列表中的100个项目可见,当您滚动并接近可见项目的结尾(或开始)时,必须在列表中加载下一部分(大约50个)。有没有简单的方法呢?

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) of the "visible" items the next portion (around 50) must be loaded in the list. Is there any simple way of doing this?

推荐答案

没有简单的方法,你必须实现分页(s )

no there are no simple way for that, you have to implements Pagination(s)


  • 数据库引擎管理时最简单的工作,大多数工作直接支持分页

  • easiest job when is managed by Databases engine, most of then support paginations directly

,但我从未见过XxxListModel的解决方法,使用JTable代替一个Colum,对于JTable的分页有一些很好的解决方法

in the Model, but I never seen workaround for XxxListModel, use JTable with one Colum instead, there are some good workaround for Pagination for JTable

这篇关于使用JList显示大量数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆