TableView<ActionOnSaveInfo> () { TableView<ActionOnSaveInfo> table = new TableView<>(new ListTableModel<>(new ActionOnSaveColumnInfo(), new ActivatedOnColumnInfo())); table.getTableHeader().setReorderingAllowed(false); table.setShowGrid(false); table.setRowSelectionAllowed(false); table.addAncestorListener(new AncestorListenerAdapter() { @Override public void ancestorAdded(AncestorEvent event) { // The 'Actions on Save' page has become visible, either the first time (right after createComponent()), or after switching to some // other page in Settings and then back to this page. Need to update the table. updateTable(); } }); // Table cells contain ActionLinks and DropDownLinks. They should get underlined on hover, and should handle clicks. In order to have // actionable UI inside cells, table switches from renderer to editor for the currently hovered cell as mouse pointer moves. // TableCellRenderer and TableCellEditor return the same component, so users don't notice cell editing start/stop. new TableHoverListener() { @Override public void onHover(@NotNull JTable table, int row, int column) { if (column != -1 && row != -1) { table.editCellAt(row, column); } else { ((TableView<?>)table).stopEditing(); } } }.addTo(table); return table; }