Mouseevent에서 jtable에서 Row Index를 안정적으로 얻는 방법은 무엇입니까?

StackOverflow https://stackoverflow.com/questions/243553

  •  04-07-2019
  •  | 
  •  

문제

사용자가 방금 클릭 한 jtable의 행에 어떤 행을 찾을 수 있습니까?

도움이 되었습니까?

해결책

이 시도:

aJTable.rowAtPoint(evt.getPoint());

다른 팁

JTable에서 선택한 의견에만 관심이 있다면 :

jTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
    public void valueChanged(ListSelectionEvent e) {
        int sel = jTable.getSelectedRow();
    }
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top