Technical Support
Discussion Forum
Online Training
Read About Java
Java In-Depth
Product Discounts
Membership Information

Java Cup Logo

JDC Home Page


Top
Back
Next
Online Training
shadowSearchFAQFeedback

TextComponent

A TextComponent is not instantiated, but is the superclass of any text-editing widget.

Methods:

  • public String getSelectedText()
    Gets the highlighted text from the TextComponent.
  • public String getText()
    Gets all the text in the TextComponent.
  • public void setEditable(boolean t)
    If noneditable, the user cannot modify the contents of the TextComponent.
  • public void setText(String t)
    Sets the current text contents.