JComponent () { final JTable table = getTableComponent(); if (table != null && table.getRowCount() > 0) { if (table.getColumnModel().getSelectedColumnCount() == 0) { final int selectedIdx = getSelectedIdx(); table.getSelectionModel().setSelectionInterval(selectedIdx, selectedIdx); table.getColumnModel().getSelectionModel().setSelectionInterval(0, 0); } return table; } if (UIUtil.isFocusable(myNameField)) { return myNameField; } if (UIUtil.isFocusable(myReturnTypeField)) { return myReturnTypeField; } return super.getPreferredFocusedComponent(); }