From 876fdf88c580c51dc794188c71e12898e6616dd8 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Wed, 30 Dec 2020 14:12:27 +0900 Subject: use method, instead of field. using field direct is baaaaaad --- .../syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java index abdda81f..2ec869e1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomedit/valueedit/ValueEditString.java @@ -26,7 +26,7 @@ public class ValueEditString extends MPanel implements ValueEdit { } }; MLabelAndElement mLabelAndElement = new MLabelAndElement("Prev",label); - mLabelAndElement.setBounds(new Rectangle(0,0,bounds.width,20)); + mLabelAndElement.setBounds(new Rectangle(0,0,getBounds().width,20)); add(mLabelAndElement); } { @@ -39,7 +39,7 @@ public class ValueEditString extends MPanel implements ValueEdit { }; textField.setText(newData); MLabelAndElement mLabelAndElement = new MLabelAndElement("New",textField); - mLabelAndElement.setBounds(new Rectangle(0,20,bounds.width,20)); + mLabelAndElement.setBounds(new Rectangle(0,20,getBounds().width,20)); add(mLabelAndElement); } } @@ -47,7 +47,7 @@ public class ValueEditString extends MPanel implements ValueEdit { @Override public void onBoundsUpdate() { for (MPanel panel :getChildComponents()){ - panel.setSize(new Dimension(bounds.width, 20)); + panel.setSize(new Dimension(getBounds().width, 20)); } } -- cgit