InstallerJDialog: smoother scrolling

This commit is contained in:
Federico Fissore 2015-03-23 11:10:12 +01:00
parent 866f5d065a
commit 8922541898
1 changed files with 6 additions and 5 deletions

View File

@ -141,11 +141,12 @@ public abstract class InstallerJDialog<T> extends JDialog {
}
{
JScrollPane s = new JScrollPane();
s.setViewportView(contribTable);
s.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
s.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
pane.add(s, BorderLayout.CENTER);
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(contribTable);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.getVerticalScrollBar().setUnitIncrement(7);
pane.add(scrollPane, BorderLayout.CENTER);
}
pane.add(Box.createHorizontalStrut(10), BorderLayout.WEST);