Reputation: 566
I just added a JScrollPane which has a JTable with headers. The problem is that when the JScrollPane shows a border line also shows. How can I remove it?
I already tried:
- JTable.setBorder(null);
- JTable.getTableHeader().setBorder(null);
- JScrollPane.setBorder(null);
- JScrollPane.getViewport().setBorder(null);
Foto of the JTable: I want to remove that border line that shows between the headers and JScrollPane
Thanks
Upvotes: 1
Views: 169
Reputation: 566
I figured it out, it was a property of JScrollPane. I just created an emptyBorder.
JScrollPane.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
Upvotes: 1