Java Bugs - TextComponent enhancement

java.awt.TextComponent has a setText() method but does not have an appendText() method. TextArea does have appendText(), and using it instead of setText() avoids flickering, so appendText() is preferable. However, since it does not appear in TextComponent, the choices are to define my classes in terms of the more specific TextArea, or to go with the more general TextComponent and put up with the flickering. Neither choice is very nice.

How about adding an appendText() method to TextComponent? Since it already has getText() and setText(), a default version of appendText() would be simple to write. Subclasses could supply their own improved version.

This deficiency is still present in JDK 1.1.


Back to bugs.
Back to ACME Java.
Back to ACME Labs.