if (locIndex >= 0) {
jList.setSelectedIndex(locIndex);
}
} else if (e.getSource() instanceof JTable) {
JTable jTable = (JTable) e.getSource();
int rowIndex = jTable.rowAtPoint(e.getPoint());
if (rowIndex >= 0) {
jTable.addRowSelectionInterval(rowIndex, rowIndex);
}
}