0

The jlabel isn't shown, because the panel isn't in the column header. I've no idea whats wrong, here is my code:

JScrollPane scrollpane_1 = new JScrollPane();
JTable table = new JTable(); //has 4 columns
JPanel panel_1 = new JPanel();
panel_1.add(new JLabel("Test"));
scrollpane_1.setViewportView(table);
scrollpane_1.setColumnView(panel_1);
  • Like [this](http://stackoverflow.com/q/7137786/230513)? – trashgod Mar 02 '14 at 19:37
  • 2
    `has 4 columns` - no it doesn't. You just created an empty table. Until you add a TableModel to the table it has no data an no columns. Post a proper [SSCCE](http://www.sscce.org/) that demonstrates your problem. – camickr Mar 02 '14 at 20:37

0 Answers0