1

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

HFR1994
  • 536
  • 1
  • 5
  • 16

1 Answers1

1

I figured it out, it was a property of JScrollPane. I just created an emptyBorder.

JScrollPane.setBorder(BorderFactory.createEmptyBorder(1,1,1,1));
HFR1994
  • 536
  • 1
  • 5
  • 16