How to get header values ​​from JTable

How can I get the header values ​​from JTable? Thanks.

+4
source share
2 answers

Using the getColumnName(int) method

 jTable.getColumnName(columnIndex) 
+3
source

It is not obvious that the column name and the header name are the same. To get the title name: jTable1.getColumnModel (). GetColumn (i) .getHeaderValue ()

+2
source

All Articles