关于以下代码为什么会显示列标题的任何想法?我试过有和没有scollpane。
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 800, 600);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JScrollPane scrollpane = new JScrollPane(table);
contentPane.add(scrollpane, "wrap, span");
tableModel = new DefaultTableModel(new Object[]{"Name","Instrument Type","Channel","Number of Channels"},0);
table = new JTable();
table.setBounds(6, 6, 697, 172);
tableModel = new DefaultTableModel(new Object[]{"Fixture Name","Fixture Type","Fixture Channel","Number of Channels"},0);
table.setModel(tableModel);
contentPane.add(table);