|
Put it in a scroll pane. This *must* be in one
of Sun's tutorials, surely?
-----Original Message----- From:
Thom Burnett <[EMAIL PROTECTED]> To:
Swing group <[EMAIL PROTECTED]> Date: Wednesday,
May 02, 2001 02:56 Subject: How to have JTable display column
headers
I have a JTable that shows normally except that
the column headers don't appear. The table model used is the
DefaultTableModel and it's constructed using
DefaultTableModel tableModel = new DefaultTableModel(data, columnNames) ;
Where columnNames is a String[] with the names that I hoped would appear
at the top of each column. There are no headers showing at all and I don't
see a method for telling a table to display (or not to display) the column
headers.
Can you explain to me how to make the headers visible at the top of the
table? --
Thom Burnett
|