How can I retrieve the header values from a JTable? Thanks.
With the getColumnName(int)
method
jTable.getColumnName(columnIndex)
It is not obvious that the Column name and the header name are the same. To get the header name: jTable1.getColumnModel().getColumn(i).getHeaderValue()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With