1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-18 07:52:14 +01:00

InstallerJDialog: smoother scrolling

This commit is contained in:
Federico Fissore 2015-03-23 11:10:12 +01:00
parent 866f5d065a
commit 8922541898

View File

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