g*****g 发帖数: 34805 | 1 List interface in Collection, Suns programmers suck big time.
Have to manually sort a JList. | z****g 发帖数: 2497 | 2 You should say the Swing team sucks.
【在 g*****g 的大作中提到】 : List interface in Collection, Suns programmers suck big time. : Have to manually sort a JList.
| L*********r 发帖数: 92 | | g*****g 发帖数: 34805 | 4 太麻烦,我的list数据量也不大,直接extends DefaultListModel,加个
sort方法,把所有数据导出到Vector, Collections sort一下,再放回去
结束。如果要优化的话也就是用一下插入排序。
【在 L*********r 的大作中提到】 : 是有点不方便. 不过, 实现起来也不麻烦. : Sun的例子: : http://java.sun.com/developer/technicalArticles/J2SE/Desktop/sorted_jlist/index.html
|
|