static int selectedTableRowInModel(final JTable t) {
  ret t == null ? -1 : swing(func -> int {
    int i = t.getSelectedRow();
    ret i < 0 ? i : t.convertRowIndexToModel(i);
  });
}