더블 클릭을 청취 한 다음 특정 열의 상세 뷰를 여는 ListSelectionListener를 사용하여 정렬 가능한 기본 테이블 모델을 가지고 있습니다. 그러나 잘 작동하지만, 열을 정렬 할 때 리스너는 더 이상 작동하지 않습니다.테이블을 정렬하면 TableRowListener가 손상됩니까?
JTable foosTable = new JTable(model);
TableRowSorter<TableModel> fooSorter = new TableRowSorter<TableModel>(model);
foosTable.setRowSorter(fooSorter);
ListSelectionModel listMod = foosTable.getSelectionModel();
listMod.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListSelectionListener barListener = new ListSelectionListener(foosTable);
listMod.addListSelectionListener(barListener);
일부 코드를 표시 할 수 있습니까? 감사. –
TableRowListener에 대해 들어 본 적이 없습니다. – camickr
@camickr. org.smir.util.table 패키지에있는 것 같습니다. http://andi-smirre.ath.cx/javadoc/org.smir.util.table/org/smir/util/table/TableRowListener.html 사용하지 마십시오. 자기. –