changeset 1983:b4be4986a4c6

Update copy constructors in TreeMapComponent PR3059 Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2016-June/019844.html Original-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-September/016481.html
author James Aziz <jaziz@redhat.com>
date Wed, 29 Jun 2016 12:23:08 -0400
parents 426125707721
children ddc9c46e66a7
files client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/TreeMapComponent.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/TreeMapComponent.java	Wed Jun 29 12:23:08 2016 -0400
+++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/components/experimental/TreeMapComponent.java	Wed Jun 29 12:23:08 2016 -0400
@@ -610,8 +610,8 @@
         }
 
         protected Label(Label other) {
+            this(other.getText());
             this.setFont(other.getFont());
-            this.setText(other.getText());
             this.setBackground(other.getBackground());
             this.setBounds(other.getBounds());
             this.setBorder(other.getBorder());
@@ -649,6 +649,7 @@
         }
 
         public Comp(Comp other) {
+            this();
             this.setBounds(other.getBounds());
             this.setBorder(other.getBorder());
             this.setLayout(other.getLayout());