From d2af58b0f68ebfbba2be7e7679efec6c8c0af12f Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 9 Feb 2017 11:50:31 -0500 Subject: Update --- .../src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java b/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java index 128dbfc..f7f2c26 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java +++ b/BJC-Utils2/src/main/java/bjc/utils/gui/panels/HolderOutputPanel.java @@ -15,7 +15,8 @@ import bjc.utils.gui.layout.HLayout; */ public class HolderOutputPanel extends JPanel { private static final long serialVersionUID = 166573313903782080L; - private Timer updateTimer; + + private Timer updater; private JLabel value; private int nDelay; private IHolder val; @@ -40,7 +41,7 @@ public class HolderOutputPanel extends JPanel { JLabel label = new JLabel(lab); value = new JLabel("(stopped)"); - updateTimer = new Timer(nDelay, (event) -> { + updater = new Timer(nDelay, (event) -> { value.setText(valueHolder.getValue()); }); @@ -56,7 +57,7 @@ public class HolderOutputPanel extends JPanel { value.setText("(stopped)"); - updateTimer = new Timer(nDelay, (event) -> { + updater = new Timer(nDelay, (event) -> { value.setText(val.getValue()); }); } @@ -65,14 +66,14 @@ public class HolderOutputPanel extends JPanel { * Start updating the contents of the field from the holder */ public void startUpdating() { - updateTimer.start(); + updater.start(); } /** * Stop updating the contents of the field from the holder */ public void stopUpdating() { - updateTimer.stop(); + updater.stop(); value.setText(value.getText() + " (stopped)"); } -- cgit v1.2.3