diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/gui/HolderOutputPanel.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/HolderOutputPanel.java b/BJC-Utils2/src/main/java/bjc/utils/gui/HolderOutputPanel.java index 49c7283..afd60cf 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/gui/HolderOutputPanel.java +++ b/BJC-Utils2/src/main/java/bjc/utils/gui/HolderOutputPanel.java @@ -49,6 +49,19 @@ public class HolderOutputPanel extends JPanel { } /** + * Set this panel back to its initial state + */ + public void reset() { + stopUpdating(); + + value.setText("(stopped)"); + + updateTimer = new Timer(nDelay, (event) -> { + value.setText(val.getValue()); + }); + } + + /** * Start updating the contents of the field from the holder */ public void startUpdating() { @@ -63,17 +76,4 @@ public class HolderOutputPanel extends JPanel { value.setText(value.getText() + " (stopped)"); } - - /** - * Set this panel back to its initial state - */ - public void reset() { - stopUpdating(); - - value.setText("(stopped)"); - - updateTimer = new Timer(nDelay, (event) -> { - value.setText(val.getValue()); - }); - } } |
