using the following code, can’t manage to get the column headers to show..Added Jscroolpane as well,but no luck…
String[] col = {"COLA","COLB","COLC"};
Object[][] data = {};
DefaultTableModel model = new DefaultTableModel(data,col);
JTable table = new JTable(model);
JScrollPane scrollPane = new JScrollPane(table);
contentPane.add(table);
table.setBounds(295, 11, 512, 411);
contentPane.add(scrollPane,BorderLayout.CENTER);
This worked: