Hello I am making a JTable in Java and I have weird problem. I can only see the background color.
This is the Method that is responsible for the creation.
public void createCustomerList() {
table = new JTable();
tableModel = new DefaultTableModel();
tableModel.addColumn("Naam");
tableModel.addColumn("Achternaam");
tableModel.addColumn("Klant-ID");
table.setSize(954, 686);
table.setLocation(100, 78);
table.setBackground(Color.white);
table.setForeground(Color.black);
table.setGridColor(Color.black);
table.setRowHeight(30);
table.setFont(new Font("Tahoma", Font.PLAIN, 36));
JScrollPane scrollPane = new JScrollPane(table);
table.setModel(tableModel);
this.add(scrollPane);
this.add(table);
}
and in my constructor I call this method. but I only get the background color ( when changing it to black or red or something else it changes ) but I don't see columns and the grid etc. Where could the problem be?