Adds JavaDoc to getWidth/Height.
@@ -298,14 +298,6 @@ public class Component {
throw new IllegalArgumentException("The position (" + position.x + " columnIndex, " + position.y + " rowIndex) is invalid.");
}
- public int getWidth() {
- return dimensions.width;
- }
-
- public int getHeight() {
- return dimensions.height;
- }
-
/**
* Sets a new position.
*
@@ -324,4 +316,24 @@ public class Component {
this.position.setLocation(position);
this.boundingBox.setLocation(position);
}
+
+ /**
+ * Retrieves the width of the component.
+ *
+ * @return
+ * The width.
+ */
+ public int getWidth() {
+ return dimensions.width;
+ }
+
+ /**
+ * Retrieves the height of the component.
+ *
+ * @return
+ * The height.
+ */
+ public int getHeight() {
+ return dimensions.height;
+ }
}
\ No newline at end of file
