diff options
author | Phil Burk <[email protected]> | 2019-09-15 13:03:30 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-15 13:03:30 -0600 |
commit | 0eb49ab0342fd0fd0660a845141dbc78508e9cd2 (patch) | |
tree | 0a3f41cefa7f5f1e5fb70ff0b2da1f75f0ba9b8c /src | |
parent | 17f8a07bbf81b5429b0db69766ffd024c892d1d7 (diff) | |
parent | 224230e7d585482f1917024a3fff14a70f3064ab (diff) |
Merge pull request #73 from philburk/safeui
ui: use safeRepaint()
Diffstat (limited to 'src')
-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; } |