I'm trying to add a table to my program that has the column names at the top and a scroll bar down the side. For some odd reason everything works, but the column names don't show nor does the scroll bar.
Here's my code, if you need a running program let me know, but you should be able to just add this to an empty JFrame:
String[] columns = {"Sport", "Location", "Date", "Result"};
String[][] data = {{"Football", "AQA Highschool", "12.11.13", "5 - 0"},
{"Tennis", "Wembley", "26.11.14.", "TBC"}};
listTable = new JTable(data, columns);
listTable.setPreferredScrollableViewportSize(new Dimension(450, 750));
listTable.setFillsViewportHeight(false);
listTable.setBounds(25, 100, 450, 640);
JScrollPane scroll = new JScrollPane(listTable);
guestFixturesPanel.add(listTable);