JTable - 过滤 [英] JTable - Filtering

查看:58
本文介绍了JTable - 过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




i从关于JTable的java.sun.com教程中读取,它说我可以使用TableRowSorter,JTable的方法setFillsViewportHeight(boolean)和其他一些方法。但似乎该类和方法不可用。我使用jre 5.是因为该类和方法有不同的版本吗?


如何在jre 5中完成过滤?


thx



i read from the java.sun.com tutorial about JTable, and it says i can use the TableRowSorter, the method setFillsViewportHeight(boolean) of JTable and some other methods. but it seems that the class and the method is not available. i use jre 5. is it because that class and method available in different version?

how can i accomplish filtering in jre 5?

thx

推荐答案


hi,


i从java.sun读取关于JTable的.com教程,它说我可以使用TableRowSorter,JTable方法setFillsViewportHeight(boolean)和其他一些方法。但似乎该类和方法不可用。我使用jre 5.是因为该类和方法有不同的版本吗?


如何在jre 5中完成过滤?


thx


i read from the java.sun.com tutorial about JTable, and it says i can use the TableRowSorter, the method setFillsViewportHeight(boolean) of JTable and some other methods. but it seems that the class and the method is not available. i use jre 5. is it because that class and method available in different version?

how can i accomplish filtering in jre 5?

thx



升级到Java 1.6以获得所有这些不错的功能;基本上你所要做的就是:

Upgrade to Java 1.6 for all those nice features; basically all you have to do is this:

展开 | 选择 | Wrap | 行号



升级到Java 1.6以获得所有这些不错的功能;基本上你所要做的就是:

Upgrade to Java 1.6 for all those nice features; basically all you have to do is this:

展开 | 选择 | Wrap | 行号



thx Jos。使用自动创建行分类器,我可以有一个带过滤功能的表吗?


thx
thx Jos. with the auto create row sorter, can i have a table with filtering feature?

thx



什么样的过滤?是显示行还是不显示过滤类型?如果是这样,你的

TableModel应该是可以承担的。如果没有,我不明白你的问题。


亲切的问候,


Jos

What sort of filtering? Either displaying a row or not type of filtering? If so, your
TableModel should be resposible for that. If not, I don''t understand your question.

kind regards,

Jos


这篇关于JTable - 过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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