There are two tables:

@FXML TableView<FrameGroupIntersections> tvOldGroups; @FXML TableView<FrameGroupIntersections> tvNewGroups; 

enter image description here

The data in them is related in class:

 public class FrameGroupIntersections { private FrameGroup group; private ObservableMap<FrameGroupIntersections,IntTypeInfoWrapper> intersections; private BooleanProperty hasErr; FrameGroupIntersections (FrameGroup group, Map<FrameGroupIntersections,IntTypeInfoWrapper> intersections){ this.group = group; hasErr = new SimpleBooleanProperty(false); setIntersections(intersections); } FrameGroupIntersections(FrameGroup group){ this(group,null); } } 

Those. FrameGroupIntersections from the left table has in the map of intersections a link to FrameGroupIntersections from the right, and vice versa.

It is necessary that when selecting any of the FrameGroupIntersections in the adjacent table, the intersections associated with it are highlighted in some color, i.e. TableRow.styleProperty() changed. Tell me, how can this be achieved?

  • You do not need to link objects to the tables. Form a response to the selection and extend it to the next table ... - Peter Slusar
  • The @PeterSlusar thing is that I don’t understand how having a connection in objects to link tables and "extend to the next table". I would be very grateful if you would give an example. - I. Perevoz

0