Comparator « JTable « Java Swing Q&A





1. Sort JTable column of longs    stackoverflow.com

I'm trying to sort a column in my JTable. The column contains Long's (java.util.Long), which implement Comparable. Therefore, reading this document, it says: 1: If a ...

2. Comparator for a specific column in JTable    stackoverflow.com

How can I set a custom comparator for a specific column in JTable? The third column of my table contains String representaion of double values and I want to creat a comparator ...

3. Java Collections's sort w/ comparator specifics    stackoverflow.com

I'm using a comparator to sort through an IRC user list and characters like [ and _ precede @.How do I prevent this? I want the users beginning with those characters ...

4. ClassCastException while using Collections. sort(Vector,Comparator)    coderanch.com

I wanted to sort a vector which contains the class references, so I use Collections.sort(vector,Comparator) method. But I encounter the classCastException while using vector.get(index) method. I used the same sort logic given in sun tutorial (stated Solving Common Collections Problems ) and it stated that it wont give any classCastException. I am using JDK1.3 . public int populateVector() { // ...