aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/TextArea.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/TextArea.java')
-rw-r--r--libjava/java/awt/TextArea.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/java/awt/TextArea.java b/libjava/java/awt/TextArea.java
index 9efc7754a20..dda45f34478 100644
--- a/libjava/java/awt/TextArea.java
+++ b/libjava/java/awt/TextArea.java
@@ -613,8 +613,17 @@ public class TextArea extends TextComponent implements java.io.Serializable
}
}
+ /**
+ * Gets the AccessibleContext associated with this <code>TextArea</code>.
+ * The context is created, if necessary.
+ *
+ * @return the associated context
+ */
public AccessibleContext getAccessibleContext()
{
- return new AccessibleAWTTextArea();
+ /* Create the context if this is the first request */
+ if (accessibleContext == null)
+ accessibleContext = new AccessibleAWTTextArea();
+ return accessibleContext;
}
}