Any Swing component can only have one parent. Here you are adding the same JTable
to 2 different JScrollPane
containers. The result is that only the last one will be displayed. For 2 JTable
components to appear you have to create 2 separate components.
table2 = new JTable();
...
tablePanel.add(new JScrollPane(table2), "growx,wrap,hmax 300");