diff options
author | Phil Burk <[email protected]> | 2019-09-15 12:01:39 -0700 |
---|---|---|
committer | Phil Burk <[email protected]> | 2019-09-15 12:01:39 -0700 |
commit | 224230e7d585482f1917024a3fff14a70f3064ab (patch) | |
tree | d4c35d0d5f3b7ea193f7ca09dea656a8fe4105b3 | |
parent | 2607d26ca1c5a86875351710ea48545a8a70bfd8 (diff) |
ui: use safeRepaint()
To allow workaround for OpenJDK bug.
https://github.com/philburk/syntona/issues/13
-rw-r--r-- | src/com/jsyn/swing/RotaryController.java | 8 |
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; } |