So the situation is this. I build a jtable dynamically from data I grabbed out of a database. Now I want to have the header tags do a sort(sorting being another problem) when a column is clicked. I do not know how to tell which column is clicked. Here is the snippet of code which I was working on for the eventListener
The print statement returns -1 each time which means that none of the 9 columns were selected. Not sure how to do this. Please help and thanks.