aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/jsyn/swing/RotaryController.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/jsyn/swing/RotaryController.java b/src/com/jsyn/swing/RotaryController.java
index 6cc84f3..c26c37f 100644
--- a/src/com/jsyn/swing/RotaryController.java
+++ b/src/com/jsyn/swing/RotaryController.java
@@ -69,11 +69,17 @@ public class RotaryController extends JPanel {
model.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
- repaint();
+ safeRepaint();
}
+
});
}
+ // This can be overridden in subclasses to workaround OpenJDK bugs.
+ public void safeRepaint() {
+ repaint();
+ }
+
public BoundedRangeModel getModel() {
return model;
}