summaryrefslogtreecommitdiff
path: root/java/awt/BorderLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/awt/BorderLayout.java')
-rw-r--r--java/awt/BorderLayout.java44
1 files changed, 22 insertions, 22 deletions
diff --git a/java/awt/BorderLayout.java b/java/awt/BorderLayout.java
index 930773f01..5033bcf7a 100644
--- a/java/awt/BorderLayout.java
+++ b/java/awt/BorderLayout.java
@@ -349,7 +349,28 @@ addLayoutComponent(Component component, Object constraints)
if (constraints != null && ! (constraints instanceof String))
throw new IllegalArgumentException("Constraint must be a string");
- String str = (String)constraints;
+ addLayoutComponent((String) constraints, component);
+}
+
+/*************************************************************************/
+
+/**
+ * Adds a component to the layout in the specified constraint position,
+ * which must be one of the string constants defined in this class.
+ *
+ * @param constraints The constraint string.
+ * @param component The component to add.
+ *
+ * @exception IllegalArgumentException If the constraint object is not
+ * one of the specified constants in this class.
+ *
+ * @deprecated This method is deprecated in favor of
+ * <code>addLayoutComponent(Component, Object)</code>.
+ */
+public void
+addLayoutComponent(String constraints, Component component)
+{
+ String str = constraints;
if (str == null || str.equals(CENTER))
center = component;
@@ -376,27 +397,6 @@ addLayoutComponent(Component component, Object constraints)
/*************************************************************************/
/**
- * Adds a component to the layout in the specified constraint position,
- * which must be one of the string constants defined in this class.
- *
- * @param constraints The constraint string.
- * @param component The component to add.
- *
- * @exception IllegalArgumentException If the constraint object is not
- * one of the specified constants in this class.
- *
- * @deprecated This method is deprecated in favor of
- * <code>addLayoutComponent(Component, Object)</code>.
- */
-public void
-addLayoutComponent(String constraints, Component component)
-{
- addLayoutComponent(component, constraints);
-}
-
-/*************************************************************************/
-
-/**
* Removes the specified component from the layout.
*
* @param component The component to remove from the layout.