int selectIndex = d.getRowCount();
Above is incorrect for two reasons:
An index in Java is zero based. If your table only has 1 row and you try to use 1 as the index you will get an Exception.
The row count does not give you the index” of the row you clicked.
If you want the data in the row you clicked then the code should be:
int selectIndex = jtable1.getSelectedRow();
CLICK HERE to find out more related problems solutions.