2011-01-13 35 views

回答

10

該命令;

table.getSelectionModel().getLeadSelectionIndex(); 
table.getColumnModel().getSelectionModel().getLeadSelectionIndex(); 

分別給出焦點行和列。

+0

它不是專注的行。它是*選定的行*。如果您選擇一行然後將焦點移到另一個應用程序,它們可能會有所不同。 – LoKi 2014-07-05 11:57:43

相關問題