Hi, I've created a JTable using the JTable(Object rows, Object columns) constructor. The data in the table shows fine and well. But I cannot get the Column headings to show... is there somethimg else I need to do after I have created the JTable?? The code is below in case... It is however a part of a project and I don't know how useful it will be...
The AnalysisPanel class extends JPanel and this is the constructor for it. It is in the AnalysisPanel that I would like the JTable to show (with the column headings). Thanks in advance...
posted 13 years ago
you need to change this: add(table, BorderLayout.CENTER); to this: add(new JScrollPane(table), BorderLayout.CENTER);
An egg is a chicken's house!
Paper has not yet been outlawed – so let your Java Swing application print with wild abandon: JPDF