Skip to content

Commit 8922541

Browse files
author
Federico Fissore
committed
InstallerJDialog: smoother scrolling
1 parent 866f5d0 commit 8922541

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

app/src/cc/arduino/contributions/ui/InstallerJDialog.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,12 @@ protected void onFilter(String[] _filters) {
141141
}
142142

143143
{
144-
JScrollPane s = new JScrollPane();
145-
s.setViewportView(contribTable);
146-
s.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
147-
s.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
148-
pane.add(s, BorderLayout.CENTER);
144+
JScrollPane scrollPane = new JScrollPane();
145+
scrollPane.setViewportView(contribTable);
146+
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
147+
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
148+
scrollPane.getVerticalScrollBar().setUnitIncrement(7);
149+
pane.add(scrollPane, BorderLayout.CENTER);
149150
}
150151

151152
pane.add(Box.createHorizontalStrut(10), BorderLayout.WEST);

0 commit comments

Comments
 (0)