If you run the small sample below you\'ll see a border around the center region. I\'m not sure why this border is showing.
It happens when a JTable is in a JScrollPane.
Use BorderFactory.createEmptyBorder() instead of null...
by using:
sp.setBorder(createEmptyBorder());
it works.
Your main method becomes:
public static void main(String[] args) {
JFrame frame = new TestScrollPane();
JPanel panel = new JPanel();
JTable table = new JTable();
panel.setLayout(new BorderLayout());
panel.add(new JLabel("NORTH"), BorderLayout.NORTH);
panel.add(new JLabel("SOUTH"), BorderLayout.SOUTH);
JScrollPane sp = new JScrollPane(table);
sp.setBorder(BorderFactory.createEmptyBorder());
panel.add(sp, BorderLayout.CENTER);
frame.add(panel);
frame.setVisible(true);
}