0

I have two JTables both within the same BorderLayout (one placed in BorderLayout.WEST and the other placed in BorderLayout.EAST). The problem I have is that when selecting rows only the rows from the one to the west can get highlighted. The problem also seems to prevent me from accessing the east tables right-click menu.

Is anyone able to identify what the problem may be?

Aurum
  • 35
  • 1
  • 7

1 Answers1

1

As discussed here, two tables can share the same selection model. Selecting a row in one table will then select the same row in the other.

westTable.setSelectionModel(eastTable.getSelectionModel());
Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045