public static void selectClickedRow(final JTable table, final MouseEvent event) {
    final int row = table.rowAtPoint(event.getPoint());

    if (row == -1) {
      return;
    }

    table.setRowSelectionInterval(row, row);
  }
Selects a table row depending on a mouse event.

@param table The table.
@param event The mouse event.
java/zylib/src/main/java/com/google/security/zynamics/zylib/gui/tables/TableHelpers.java