gdkinney_2
asked on
Need to sort a JTable column correctly in Java 1.6. So that "2" comes before "16" when I sort the column in ascending order.
Need to be able to sort a JTable column correctly in Java 1.6. For example so that "2" comes before "16" when I sort the column in ascending order.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
can you post the code soit will be easy for me to point out where to change
>>For example so that "2" comes before "16" when I sort the column in ascending order
if the values are integer/numeric pass them as approprite object type rather String. for e.g., if it is integer, new Integer( 2 ) instead of "2"!
if the values are integer/numeric pass them as approprite object type rather String. for e.g., if it is integer, new Integer( 2 ) instead of "2"!
also make sure the column class returned appropriately by the model. for e.g., for int, return Integer.class
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER