I have JTable, which can have thousands of rows with, each having one checkbox. I have implemented the functionality of "check all" "un check all". but it takes a lot of time to process when there are thousands of rows. Is there any way to do it faster
mTableForActionListener.addRowSelectionInterval(sArray[0].intValue(), sArray[sArray.length - 1].intValue());
for (int i = 0; i < sArray.length; i++)
{
int viewindex = mTableForActionListener.getRowSorter().convertRowIndexToView(i);
mTableForActionListener.addRowSelectionInterval(sArray[i].intValue(), sArray[i].intValue());
}
Above is just the snippet of my code which is taking the most time.
Aucun commentaire:
Enregistrer un commentaire