Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道我将如何选择一行JTable,然后突出显示另一行JTable?
JTable
ListSelectionListener[] listeners = leftJTable.getListeners(ListSelectionListener.class);
是的,两个表可以共享相同的ListSelectionModel:
ListSelectionModel
JTable left = new JTable(...); JTable right = new JTable(...); right.setSelectionModel(left.getSelectionModel());