Call:
jscrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
which will make sure no horizontal JScrollBar
is created for the JScrollPane
.
Perhaps also need to ensure the JScrollPane
fits the JTable
horizontally via:
table.setPreferredScrollableViewportSize(table.getPreferredSize());
JScrollPane jscrollpane = new JScrollPane(table);