I have a JTable which is created using a TableModel JTable t = new JTable(tableModel) I want to add a title to it. I was hoping for something like t.setTi
JTable t = new JTable(tableModel)
t.setTi
You can also add your title the JScrollPane which inscribes jtable in it.
Code:
JScrollPane scrollPane = new JScrollPane(table); scrollPane.setBorder(BorderFactory.createTitledBorder ("Table Title"));