vendredi 30 juin 2017

JTable if current cell < cell total

how can I check following pseudo code in a JTable in real code ?

If( currentSelectedCell < cellTotal) {

//do stuff

}

where currentSelectedCell represents the current selected cell as the name says ... And cellTotal represent the number of all cells in the table. Both of type Integer.

I have no clue how to get the currentSelectedCell count ... Like if the table has 8 cells and about two rows 4 in one row and I select the third cell in row 2 would be cell count 6 cause it starts at "0" but how to count that ?

Aucun commentaire:

Enregistrer un commentaire