java.awt
Class TextArea

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent 
          extended by java.awt.TextArea
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

public class TextArea
extends TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent

A TextArea object is a multi-line region that displays text. It can be set to allow editing or to be read-only.

The following image shows the appearance of a text area:

A TextArea showing the word 'Hello!'

This text area could be created by the following line of code:


 new TextArea("Hello", 5, 40);
 

Since:
JDK1.0
See Also:
Serialized Form

Nested Class Summary
protected  class TextArea.AccessibleAWTTextArea sample code for java.awt.TextArea.AccessibleAWTTextArea definition code for java.awt.TextArea.AccessibleAWTTextArea
          This class implements accessibility support for the TextArea class.
 
Nested classes/interfaces inherited from class java.awt.TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
TextComponent.AccessibleAWTTextComponent sample code for java.awt.TextComponent.AccessibleAWTTextComponent definition code for java.awt.TextComponent.AccessibleAWTTextComponent
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
static int SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH
          Create and display both vertical and horizontal scrollbars.
static int SCROLLBARS_HORIZONTAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_HORIZONTAL_ONLY definition code for java.awt.TextArea.SCROLLBARS_HORIZONTAL_ONLY
          Create and display horizontal scrollbar only.
static int SCROLLBARS_NONE sample code for java.awt.TextArea.SCROLLBARS_NONE definition code for java.awt.TextArea.SCROLLBARS_NONE
          Do not create or display any scrollbars for the text area.
static int SCROLLBARS_VERTICAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY definition code for java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY
          Create and display vertical scrollbar only.
 
Fields inherited from class java.awt.TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
textListener sample code for java.awt.TextComponent.textListener definition code for java.awt.TextComponent.textListener
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
TextArea sample code for java.awt.TextArea.TextArea() definition code for java.awt.TextArea.TextArea() ()
          Constructs a new text area with the empty string as text.
TextArea sample code for java.awt.TextArea.TextArea(int, int) definition code for java.awt.TextArea.TextArea(int, int) (int rows, int columns)
          Constructs a new text area with the specified number of rows and columns and the empty string as text.
TextArea sample code for java.awt.TextArea.TextArea(java.lang.String) definition code for java.awt.TextArea.TextArea(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  text)
          Constructs a new text area with the specified text.
TextArea sample code for java.awt.TextArea.TextArea(java.lang.String, int, int) definition code for java.awt.TextArea.TextArea(java.lang.String, int, int) (String sample code for java.lang.String definition code for java.lang.String  text, int rows, int columns)
          Constructs a new text area with the specified text, and with the specified number of rows and columns.
TextArea sample code for java.awt.TextArea.TextArea(java.lang.String, int, int, int) definition code for java.awt.TextArea.TextArea(java.lang.String, int, int, int) (String sample code for java.lang.String definition code for java.lang.String  text, int rows, int columns, int scrollbars)
          Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified.
 
Method Summary
 void addNotify sample code for java.awt.TextArea.addNotify() definition code for java.awt.TextArea.addNotify() ()
          Creates the TextArea's peer.
 void append sample code for java.awt.TextArea.append(java.lang.String) definition code for java.awt.TextArea.append(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  str)
          Appends the given text to the text area's current text.
 void appendText sample code for java.awt.TextArea.appendText(java.lang.String) definition code for java.awt.TextArea.appendText(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  str)
          Deprecated. As of JDK version 1.1, replaced by append(String).
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for java.awt.TextArea.getAccessibleContext() definition code for java.awt.TextArea.getAccessibleContext() ()
          Returns the AccessibleContext associated with this TextArea.
 int getColumns sample code for java.awt.TextArea.getColumns() definition code for java.awt.TextArea.getColumns() ()
          Returns the number of columns in this text area.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for java.awt.TextArea.getMinimumSize() definition code for java.awt.TextArea.getMinimumSize() ()
          Determines the minimum size of this text area.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getMinimumSize sample code for java.awt.TextArea.getMinimumSize(int, int) definition code for java.awt.TextArea.getMinimumSize(int, int) (int rows, int columns)
          Determines the minimum size of a text area with the specified number of rows and columns.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for java.awt.TextArea.getPreferredSize() definition code for java.awt.TextArea.getPreferredSize() ()
          Determines the preferred size of this text area.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getPreferredSize sample code for java.awt.TextArea.getPreferredSize(int, int) definition code for java.awt.TextArea.getPreferredSize(int, int) (int rows, int columns)
          Determines the preferred size of a text area with the specified number of rows and columns.
 int getRows sample code for java.awt.TextArea.getRows() definition code for java.awt.TextArea.getRows() ()
          Returns the number of rows in the text area.
 int getScrollbarVisibility sample code for java.awt.TextArea.getScrollbarVisibility() definition code for java.awt.TextArea.getScrollbarVisibility() ()
          Returns an enumerated value that indicates which scroll bars the text area uses.
 void insert sample code for java.awt.TextArea.insert(java.lang.String, int) definition code for java.awt.TextArea.insert(java.lang.String, int) (String sample code for java.lang.String definition code for java.lang.String  str, int pos)
          Inserts the specified text at the specified position in this text area.
 void insertText sample code for java.awt.TextArea.insertText(java.lang.String, int) definition code for java.awt.TextArea.insertText(java.lang.String, int) (String sample code for java.lang.String definition code for java.lang.String  str, int pos)
          Deprecated. As of JDK version 1.1, replaced by insert(String, int).
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension minimumSize sample code for java.awt.TextArea.minimumSize() definition code for java.awt.TextArea.minimumSize() ()
          Deprecated. As of JDK version 1.1, replaced by getMinimumSize().
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension minimumSize sample code for java.awt.TextArea.minimumSize(int, int) definition code for java.awt.TextArea.minimumSize(int, int) (int rows, int columns)
          Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for java.awt.TextArea.paramString() definition code for java.awt.TextArea.paramString() ()
          Returns a string representing the state of this TextArea.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension preferredSize sample code for java.awt.TextArea.preferredSize() definition code for java.awt.TextArea.preferredSize() ()
          Deprecated. As of JDK version 1.1, replaced by getPreferredSize().
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension preferredSize sample code for java.awt.TextArea.preferredSize(int, int) definition code for java.awt.TextArea.preferredSize(int, int) (int rows, int columns)
          Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).
 void replaceRange sample code for java.awt.TextArea.replaceRange(java.lang.String, int, int) definition code for java.awt.TextArea.replaceRange(java.lang.String, int, int) (String sample code for java.lang.String definition code for java.lang.String  str, int start, int end)
          Replaces text between the indicated start and end positions with the specified replacement text.
 void replaceText sample code for java.awt.TextArea.replaceText(java.lang.String, int, int) definition code for java.awt.TextArea.replaceText(java.lang.String, int, int) (String sample code for java.lang.String definition code for java.lang.String  str, int start, int end)
          Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).
 void setColumns sample code for java.awt.TextArea.setColumns(int) definition code for java.awt.TextArea.setColumns(int) (int columns)
          Sets the number of columns for this text area.
 void setRows sample code for java.awt.TextArea.setRows(int) definition code for java.awt.TextArea.setRows(int) (int rows)
          Sets the number of rows for this text area.
 
Methods inherited from class java.awt.TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
addTextListener sample code for java.awt.TextComponent.addTextListener(java.awt.event.TextListener) definition code for java.awt.TextComponent.addTextListener(java.awt.event.TextListener) , enableInputMethods sample code for java.awt.TextComponent.enableInputMethods(boolean) definition code for java.awt.TextComponent.enableInputMethods(boolean) , getBackground sample code for java.awt.TextComponent.getBackground() definition code for java.awt.TextComponent.getBackground() , getCaretPosition sample code for java.awt.TextComponent.getCaretPosition() definition code for java.awt.TextComponent.getCaretPosition() , getInputMethodRequests sample code for java.awt.TextComponent.getInputMethodRequests() definition code for java.awt.TextComponent.getInputMethodRequests() , getListeners sample code for java.awt.TextComponent.getListeners(java.lang.Class) definition code for java.awt.TextComponent.getListeners(java.lang.Class) , getSelectedText sample code for java.awt.TextComponent.getSelectedText() definition code for java.awt.TextComponent.getSelectedText() , getSelectionEnd sample code for java.awt.TextComponent.getSelectionEnd() definition code for java.awt.TextComponent.getSelectionEnd() , getSelectionStart sample code for java.awt.TextComponent.getSelectionStart() definition code for java.awt.TextComponent.getSelectionStart() , getText sample code for java.awt.TextComponent.getText() definition code for java.awt.TextComponent.getText() , getTextListeners sample code for java.awt.TextComponent.getTextListeners() definition code for java.awt.TextComponent.getTextListeners() , isEditable sample code for java.awt.TextComponent.isEditable() definition code for java.awt.TextComponent.isEditable() , processEvent sample code for java.awt.TextComponent.processEvent(java.awt.AWTEvent) definition code for java.awt.TextComponent.processEvent(java.awt.AWTEvent) , processTextEvent sample code for java.awt.TextComponent.processTextEvent(java.awt.event.TextEvent) definition code for java.awt.TextComponent.processTextEvent(java.awt.event.TextEvent) , removeNotify sample code for java.awt.TextComponent.removeNotify() definition code for java.awt.TextComponent.removeNotify() , removeTextListener sample code for java.awt.TextComponent.removeTextListener(java.awt.event.TextListener) definition code for java.awt.TextComponent.removeTextListener(java.awt.event.TextListener) , select sample code for java.awt.TextComponent.select(int, int) definition code for java.awt.TextComponent.select(int, int) , selectAll sample code for java.awt.TextComponent.selectAll() definition code for java.awt.TextComponent.selectAll() , setBackground sample code for java.awt.TextComponent.setBackground(java.awt.Color) definition code for java.awt.TextComponent.setBackground(java.awt.Color) , setCaretPosition sample code for java.awt.TextComponent.setCaretPosition(int) definition code for java.awt.TextComponent.setCaretPosition(int) , setEditable sample code for java.awt.TextComponent.setEditable(boolean) definition code for java.awt.TextComponent.setEditable(boolean) , setSelectionEnd sample code for java.awt.TextComponent.setSelectionEnd(int) definition code for java.awt.TextComponent.setSelectionEnd(int) , setSelectionStart sample code for java.awt.TextComponent.setSelectionStart(int) definition code for java.awt.TextComponent.setSelectionStart(int) , setText sample code for java.awt.TextComponent.setText(java.lang.String) definition code for java.awt.TextComponent.setText(java.lang.String)
 
Methods inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
action sample code for java.awt.Component.action(java.awt.Event, java.lang.Object) definition code for java.awt.Component.action(java.awt.Event, java.lang.Object) , add sample code for java.awt.Component.add(java.awt.PopupMenu) definition code for java.awt.Component.add(java.awt.PopupMenu) , addComponentListener sample code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.addComponentListener(java.awt.event.ComponentListener) , addFocusListener sample code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.addFocusListener(java.awt.event.FocusListener) , addHierarchyBoundsListener sample code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , addHierarchyListener sample code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.addHierarchyListener(java.awt.event.HierarchyListener) , addInputMethodListener sample code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.addInputMethodListener(java.awt.event.InputMethodListener) , addKeyListener sample code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.addKeyListener(java.awt.event.KeyListener) , addMouseListener sample code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.addMouseListener(java.awt.event.MouseListener) , addMouseMotionListener sample code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.addMouseMotionListener(java.awt.event.MouseMotionListener) , addMouseWheelListener sample code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.addMouseWheelListener(java.awt.event.MouseWheelListener) , addPropertyChangeListener sample code for java.awt.Component.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.addPropertyChangeListener(java.beans.PropertyChangeListener) , addPropertyChangeListener sample code for java.awt.Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , applyComponentOrientation sample code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.applyComponentOrientation(java.awt.ComponentOrientation) , areFocusTraversalKeysSet sample code for java.awt.Component.areFocusTraversalKeysSet(int) definition code for java.awt.Component.areFocusTraversalKeysSet(int) , bounds sample code for java.awt.Component.bounds() definition code for java.awt.Component.bounds() , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, java.awt.image.ImageObserver) , checkImage sample code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , coalesceEvents sample code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) definition code for java.awt.Component.coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent) , contains sample code for java.awt.Component.contains(int, int) definition code for java.awt.Component.contains(int, int) , contains sample code for java.awt.Component.contains(java.awt.Point) definition code for java.awt.Component.contains(java.awt.Point) , createImage sample code for java.awt.Component.createImage(java.awt.image.ImageProducer) definition code for java.awt.Component.createImage(java.awt.image.ImageProducer) , createImage sample code for java.awt.Component.createImage(int, int) definition code for java.awt.Component.createImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int) definition code for java.awt.Component.createVolatileImage(int, int) , createVolatileImage sample code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) definition code for java.awt.Component.createVolatileImage(int, int, java.awt.ImageCapabilities) , deliverEvent sample code for java.awt.Component.deliverEvent(java.awt.Event) definition code for java.awt.Component.deliverEvent(java.awt.Event) , disable sample code for java.awt.Component.disable() definition code for java.awt.Component.disable() , disableEvents sample code for java.awt.Component.disableEvents(long) definition code for java.awt.Component.disableEvents(long) , dispatchEvent sample code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) definition code for java.awt.Component.dispatchEvent(java.awt.AWTEvent) , doLayout sample code for java.awt.Component.doLayout() definition code for java.awt.Component.doLayout() , enable sample code for java.awt.Component.enable() definition code for java.awt.Component.enable() , enable sample code for java.awt.Component.enable(boolean) definition code for java.awt.Component.enable(boolean) , enableEvents sample code for java.awt.Component.enableEvents(long) definition code for java.awt.Component.enableEvents(long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) definition code for java.awt.Component.firePropertyChange(java.lang.String, boolean, boolean) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) definition code for java.awt.Component.firePropertyChange(java.lang.String, byte, byte) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, char, char) definition code for java.awt.Component.firePropertyChange(java.lang.String, char, char) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, double, double) definition code for java.awt.Component.firePropertyChange(java.lang.String, double, double) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, float, float) definition code for java.awt.Component.firePropertyChange(java.lang.String, float, float) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, int, int) definition code for java.awt.Component.firePropertyChange(java.lang.String, int, int) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, long, long) definition code for java.awt.Component.firePropertyChange(java.lang.String, long, long) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for java.awt.Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) , firePropertyChange sample code for java.awt.Component.firePropertyChange(java.lang.String, short, short) definition code for java.awt.Component.firePropertyChange(java.lang.String, short, short) , getAlignmentX sample code for java.awt.Component.getAlignmentX() definition code for java.awt.Component.getAlignmentX() , getAlignmentY sample code for java.awt.Component.getAlignmentY() definition code for java.awt.Component.getAlignmentY() , getBounds sample code for java.awt.Component.getBounds() definition code for java.awt.Component.getBounds() , getBounds sample code for java.awt.Component.getBounds(java.awt.Rectangle) definition code for java.awt.Component.getBounds(java.awt.Rectangle) , getColorModel sample code for java.awt.Component.getColorModel() definition code for java.awt.Component.getColorModel() , getComponentAt sample code for java.awt.Component.getComponentAt(int, int) definition code for java.awt.Component.getComponentAt(int, int) , getComponentAt sample code for java.awt.Component.getComponentAt(java.awt.Point) definition code for java.awt.Component.getComponentAt(java.awt.Point) , getComponentListeners sample code for java.awt.Component.getComponentListeners() definition code for java.awt.Component.getComponentListeners() , getComponentOrientation sample code for java.awt.Component.getComponentOrientation() definition code for java.awt.Component.getComponentOrientation() , getCursor sample code for java.awt.Component.getCursor() definition code for java.awt.Component.getCursor() , getDropTarget sample code for java.awt.Component.getDropTarget() definition code for java.awt.Component.getDropTarget() , getFocusCycleRootAncestor sample code for java.awt.Component.getFocusCycleRootAncestor() definition code for java.awt.Component.getFocusCycleRootAncestor() , getFocusListeners sample code for java.awt.Component.getFocusListeners() definition code for java.awt.Component.getFocusListeners() , getFocusTraversalKeys sample code for java.awt.Component.getFocusTraversalKeys(int) definition code for java.awt.Component.getFocusTraversalKeys(int) , getFocusTraversalKeysEnabled sample code for java.awt.Component.getFocusTraversalKeysEnabled() definition code for java.awt.Component.getFocusTraversalKeysEnabled() , getFont sample code for java.awt.Component.getFont() definition code for java.awt.Component.getFont() , getFontMetrics sample code for java.awt.Component.getFontMetrics(java.awt.Font) definition code for java.awt.Component.getFontMetrics(java.awt.Font) , getForeground sample code for java.awt.Component.getForeground() definition code for java.awt.Component.getForeground() , getGraphics sample code for java.awt.Component.getGraphics() definition code for java.awt.Component.getGraphics() , getGraphicsConfiguration sample code for java.awt.Component.getGraphicsConfiguration() definition code for java.awt.Component.getGraphicsConfiguration() , getHeight sample code for java.awt.Component.getHeight() definition code for java.awt.Component.getHeight() , getHierarchyBoundsListeners sample code for java.awt.Component.getHierarchyBoundsListeners() definition code for java.awt.Component.getHierarchyBoundsListeners() , getHierarchyListeners sample code for java.awt.Component.getHierarchyListeners() definition code for java.awt.Component.getHierarchyListeners() , getIgnoreRepaint sample code for java.awt.Component.getIgnoreRepaint() definition code for java.awt.Component.getIgnoreRepaint() , getInputContext sample code for java.awt.Component.getInputContext() definition code for java.awt.Component.getInputContext() , getInputMethodListeners sample code for java.awt.Component.getInputMethodListeners() definition code for java.awt.Component.getInputMethodListeners() , getKeyListeners sample code for java.awt.Component.getKeyListeners() definition code for java.awt.Component.getKeyListeners() , getLocale sample code for java.awt.Component.getLocale() definition code for java.awt.Component.getLocale() , getLocation sample code for java.awt.Component.getLocation() definition code for java.awt.Component.getLocation() , getLocation sample code for java.awt.Component.getLocation(java.awt.Point) definition code for java.awt.Component.getLocation(java.awt.Point) , getLocationOnScreen sample code for java.awt.Component.getLocationOnScreen() definition code for java.awt.Component.getLocationOnScreen() , getMaximumSize sample code for java.awt.Component.getMaximumSize() definition code for java.awt.Component.getMaximumSize() , getMouseListeners sample code for java.awt.Component.getMouseListeners() definition code for java.awt.Component.getMouseListeners() , getMouseMotionListeners sample code for java.awt.Component.getMouseMotionListeners() definition code for java.awt.Component.getMouseMotionListeners() , getMousePosition sample code for java.awt.Component.getMousePosition() definition code for java.awt.Component.getMousePosition() , getMouseWheelListeners sample code for java.awt.Component.getMouseWheelListeners() definition code for java.awt.Component.getMouseWheelListeners() , getName sample code for java.awt.Component.getName() definition code for java.awt.Component.getName() , getParent sample code for java.awt.Component.getParent() definition code for java.awt.Component.getParent() , getPeer sample code for java.awt.Component.getPeer() definition code for java.awt.Component.getPeer() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners() definition code for java.awt.Component.getPropertyChangeListeners() , getPropertyChangeListeners sample code for java.awt.Component.getPropertyChangeListeners(java.lang.String) definition code for java.awt.Component.getPropertyChangeListeners(java.lang.String) , getSize sample code for java.awt.Component.getSize() definition code for java.awt.Component.getSize() , getSize sample code for java.awt.Component.getSize(java.awt.Dimension) definition code for java.awt.Component.getSize(java.awt.Dimension) , getToolkit sample code for java.awt.Component.getToolkit() definition code for java.awt.Component.getToolkit() , getTreeLock sample code for java.awt.Component.getTreeLock() definition code for java.awt.Component.getTreeLock() , getWidth sample code for java.awt.Component.getWidth() definition code for java.awt.Component.getWidth() , getX sample code for java.awt.Component.getX() definition code for java.awt.Component.getX() , getY sample code for java.awt.Component.getY() definition code for java.awt.Component.getY() , gotFocus sample code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.gotFocus(java.awt.Event, java.lang.Object) , handleEvent sample code for java.awt.Component.handleEvent(java.awt.Event) definition code for java.awt.Component.handleEvent(java.awt.Event) , hasFocus sample code for java.awt.Component.hasFocus() definition code for java.awt.Component.hasFocus() , hide sample code for java.awt.Component.hide() definition code for java.awt.Component.hide() , imageUpdate sample code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) definition code for java.awt.Component.imageUpdate(java.awt.Image, int, int, int, int, int) , inside sample code for java.awt.Component.inside(int, int) definition code for java.awt.Component.inside(int, int) , invalidate sample code for java.awt.Component.invalidate() definition code for java.awt.Component.invalidate() , isBackgroundSet sample code for java.awt.Component.isBackgroundSet() definition code for java.awt.Component.isBackgroundSet() , isCursorSet sample code for java.awt.Component.isCursorSet() definition code for java.awt.Component.isCursorSet() , isDisplayable sample code for java.awt.Component.isDisplayable() definition code for java.awt.Component.isDisplayable() , isDoubleBuffered sample code for java.awt.Component.isDoubleBuffered() definition code for java.awt.Component.isDoubleBuffered() , isEnabled sample code for java.awt.Component.isEnabled() definition code for java.awt.Component.isEnabled() , isFocusable sample code for java.awt.Component.isFocusable() definition code for java.awt.Component.isFocusable() , isFocusCycleRoot sample code for java.awt.Component.isFocusCycleRoot(java.awt.Container) definition code for java.awt.Component.isFocusCycleRoot(java.awt.Container) , isFocusOwner sample code for java.awt.Component.isFocusOwner() definition code for java.awt.Component.isFocusOwner() , isFocusTraversable sample code for java.awt.Component.isFocusTraversable() definition code for java.awt.Component.isFocusTraversable() , isFontSet sample code for java.awt.Component.isFontSet() definition code for java.awt.Component.isFontSet() , isForegroundSet sample code for java.awt.Component.isForegroundSet() definition code for java.awt.Component.isForegroundSet() , isLightweight sample code for java.awt.Component.isLightweight() definition code for java.awt.Component.isLightweight() , isMaximumSizeSet sample code for java.awt.Component.isMaximumSizeSet() definition code for java.awt.Component.isMaximumSizeSet() , isMinimumSizeSet sample code for java.awt.Component.isMinimumSizeSet() definition code for java.awt.Component.isMinimumSizeSet() , isOpaque sample code for java.awt.Component.isOpaque() definition code for java.awt.Component.isOpaque() , isPreferredSizeSet sample code for java.awt.Component.isPreferredSizeSet() definition code for java.awt.Component.isPreferredSizeSet() , isShowing sample code for java.awt.Component.isShowing() definition code for java.awt.Component.isShowing() , isValid sample code for java.awt.Component.isValid() definition code for java.awt.Component.isValid() , isVisible sample code for java.awt.Component.isVisible() definition code for java.awt.Component.isVisible() , keyDown sample code for java.awt.Component.keyDown(java.awt.Event, int) definition code for java.awt.Component.keyDown(java.awt.Event, int) , keyUp sample code for java.awt.Component.keyUp(java.awt.Event, int) definition code for java.awt.Component.keyUp(java.awt.Event, int) , layout sample code for java.awt.Component.layout() definition code for java.awt.Component.layout() , list sample code for java.awt.Component.list() definition code for java.awt.Component.list() , list sample code for java.awt.Component.list(java.io.PrintStream) definition code for java.awt.Component.list(java.io.PrintStream) , list sample code for java.awt.Component.list(java.io.PrintStream, int) definition code for java.awt.Component.list(java.io.PrintStream, int) , list sample code for java.awt.Component.list(java.io.PrintWriter) definition code for java.awt.Component.list(java.io.PrintWriter) , list sample code for java.awt.Component.list(java.io.PrintWriter, int) definition code for java.awt.Component.list(java.io.PrintWriter, int) , locate sample code for java.awt.Component.locate(int, int) definition code for java.awt.Component.locate(int, int) , location sample code for java.awt.Component.location() definition code for java.awt.Component.location() , lostFocus sample code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) definition code for java.awt.Component.lostFocus(java.awt.Event, java.lang.Object) , mouseDown sample code for java.awt.Component.mouseDown(java.awt.Event, int, int) definition code for java.awt.Component.mouseDown(java.awt.Event, int, int) , mouseDrag sample code for java.awt.Component.mouseDrag(java.awt.Event, int, int) definition code for java.awt.Component.mouseDrag(java.awt.Event, int, int) , mouseEnter sample code for java.awt.Component.mouseEnter(java.awt.Event, int, int) definition code for java.awt.Component.mouseEnter(java.awt.Event, int, int) , mouseExit sample code for java.awt.Component.mouseExit(java.awt.Event, int, int) definition code for java.awt.Component.mouseExit(java.awt.Event, int, int) , mouseMove sample code for java.awt.Component.mouseMove(java.awt.Event, int, int) definition code for java.awt.Component.mouseMove(java.awt.Event, int, int) , mouseUp sample code for java.awt.Component.mouseUp(java.awt.Event, int, int) definition code for java.awt.Component.mouseUp(java.awt.Event, int, int) , move sample code for java.awt.Component.move(int, int) definition code for java.awt.Component.move(int, int) , nextFocus sample code for java.awt.Component.nextFocus() definition code for java.awt.Component.nextFocus() , paint sample code for java.awt.Component.paint(java.awt.Graphics) definition code for java.awt.Component.paint(java.awt.Graphics) , paintAll sample code for java.awt.Component.paintAll(java.awt.Graphics) definition code for java.awt.Component.paintAll(java.awt.Graphics) , postEvent sample code for java.awt.Component.postEvent(java.awt.Event) definition code for java.awt.Component.postEvent(java.awt.Event) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, java.awt.image.ImageObserver) , prepareImage sample code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) definition code for java.awt.Component.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver) , print sample code for java.awt.Component.print(java.awt.Graphics) definition code for java.awt.Component.print(java.awt.Graphics) , printAll sample code for java.awt.Component.printAll(java.awt.Graphics) definition code for java.awt.Component.printAll(java.awt.Graphics) , processComponentEvent sample code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) definition code for java.awt.Component.processComponentEvent(java.awt.event.ComponentEvent) , processFocusEvent sample code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) definition code for java.awt.Component.processFocusEvent(java.awt.event.FocusEvent) , processHierarchyBoundsEvent sample code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyBoundsEvent(java.awt.event.HierarchyEvent) , processHierarchyEvent sample code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) definition code for java.awt.Component.processHierarchyEvent(java.awt.event.HierarchyEvent) , processInputMethodEvent sample code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) definition code for java.awt.Component.processInputMethodEvent(java.awt.event.InputMethodEvent) , processKeyEvent sample code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) definition code for java.awt.Component.processKeyEvent(java.awt.event.KeyEvent) , processMouseEvent sample code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseEvent(java.awt.event.MouseEvent) , processMouseMotionEvent sample code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) definition code for java.awt.Component.processMouseMotionEvent(java.awt.event.MouseEvent) , processMouseWheelEvent sample code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) definition code for java.awt.Component.processMouseWheelEvent(java.awt.event.MouseWheelEvent) , remove sample code for java.awt.Component.remove(java.awt.MenuComponent) definition code for java.awt.Component.remove(java.awt.MenuComponent) , removeComponentListener sample code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) definition code for java.awt.Component.removeComponentListener(java.awt.event.ComponentListener) , removeFocusListener sample code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) definition code for java.awt.Component.removeFocusListener(java.awt.event.FocusListener) , removeHierarchyBoundsListener sample code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) definition code for java.awt.Component.removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener) , removeHierarchyListener sample code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) definition code for java.awt.Component.removeHierarchyListener(java.awt.event.HierarchyListener) , removeInputMethodListener sample code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) definition code for java.awt.Component.removeInputMethodListener(java.awt.event.InputMethodListener) , removeKeyListener sample code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) definition code for java.awt.Component.removeKeyListener(java.awt.event.KeyListener) , removeMouseListener sample code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) definition code for java.awt.Component.removeMouseListener(java.awt.event.MouseListener) , removeMouseMotionListener sample code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) definition code for java.awt.Component.removeMouseMotionListener(java.awt.event.MouseMotionListener) , removeMouseWheelListener sample code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) definition code for java.awt.Component.removeMouseWheelListener(java.awt.event.MouseWheelListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.beans.PropertyChangeListener) , removePropertyChangeListener sample code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) definition code for java.awt.Component.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener) , repaint sample code for java.awt.Component.repaint() definition code for java.awt.Component.repaint() , repaint sample code for java.awt.Component.repaint(int, int, int, int) definition code for java.awt.Component.repaint(int, int, int, int) , repaint sample code for java.awt.Component.repaint(long) definition code for java.awt.Component.repaint(long) , repaint sample code for java.awt.Component.repaint(long, int, int, int, int) definition code for java.awt.Component.repaint(long, int, int, int, int) , requestFocus sample code for java.awt.Component.requestFocus() definition code for java.awt.Component.requestFocus() , requestFocus sample code for java.awt.Component.requestFocus(boolean) definition code for java.awt.Component.requestFocus(boolean) , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow() definition code for java.awt.Component.requestFocusInWindow() , requestFocusInWindow sample code for java.awt.Component.requestFocusInWindow(boolean) definition code for java.awt.Component.requestFocusInWindow(boolean) , reshape sample code for java.awt.Component.reshape(int, int, int, int) definition code for java.awt.Component.reshape(int, int, int, int) , resize sample code for java.awt.Component.resize(java.awt.Dimension) definition code for java.awt.Component.resize(java.awt.Dimension) , resize sample code for java.awt.Component.resize(int, int) definition code for java.awt.Component.resize(int, int) , setBounds sample code for java.awt.Component.setBounds(int, int, int, int) definition code for java.awt.Component.setBounds(int, int, int, int) , setBounds sample code for java.awt.Component.setBounds(java.awt.Rectangle) definition code for java.awt.Component.setBounds(java.awt.Rectangle) , setComponentOrientation sample code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) definition code for java.awt.Component.setComponentOrientation(java.awt.ComponentOrientation) , setCursor sample code for java.awt.Component.setCursor(java.awt.Cursor) definition code for java.awt.Component.setCursor(java.awt.Cursor) , setDropTarget sample code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) definition code for java.awt.Component.setDropTarget(java.awt.dnd.DropTarget) , setEnabled sample code for java.awt.Component.setEnabled(boolean) definition code for java.awt.Component.setEnabled(boolean) , setFocusable sample code for java.awt.Component.setFocusable(boolean) definition code for java.awt.Component.setFocusable(boolean) , setFocusTraversalKeys sample code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) definition code for java.awt.Component.setFocusTraversalKeys(int, java.util.Set) , setFocusTraversalKeysEnabled sample code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) definition code for java.awt.Component.setFocusTraversalKeysEnabled(boolean) , setFont sample code for java.awt.Component.setFont(java.awt.Font) definition code for java.awt.Component.setFont(java.awt.Font) , setForeground sample code for java.awt.Component.setForeground(java.awt.Color) definition code for java.awt.Component.setForeground(java.awt.Color) , setIgnoreRepaint sample code for java.awt.Component.setIgnoreRepaint(boolean) definition code for java.awt.Component.setIgnoreRepaint(boolean) , setLocale sample code for java.awt.Component.setLocale(java.util.Locale) definition code for java.awt.Component.setLocale(java.util.Locale) , setLocation sample code for java.awt.Component.setLocation(int, int) definition code for java.awt.Component.setLocation(int, int) , setLocation sample code for java.awt.Component.setLocation(java.awt.Point) definition code for java.awt.Component.setLocation(java.awt.Point) , setMaximumSize sample code for java.awt.Component.setMaximumSize(java.awt.Dimension) definition code for java.awt.Component.setMaximumSize(java.awt.Dimension) , setMinimumSize sample code for java.awt.Component.setMinimumSize(java.awt.Dimension) definition code for java.awt.Component.setMinimumSize(java.awt.Dimension) , setName sample code for java.awt.Component.setName(java.lang.String) definition code for java.awt.Component.setName(java.lang.String) , setPreferredSize sample code for java.awt.Component.setPreferredSize(java.awt.Dimension) definition code for java.awt.Component.setPreferredSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(java.awt.Dimension) definition code for java.awt.Component.setSize(java.awt.Dimension) , setSize sample code for java.awt.Component.setSize(int, int) definition code for java.awt.Component.setSize(int, int) , setVisible sample code for java.awt.Component.setVisible(boolean) definition code for java.awt.Component.setVisible(boolean) , show sample code for java.awt.Component.show() definition code for java.awt.Component.show() , show sample code for java.awt.Component.show(boolean) definition code for java.awt.Component.show(boolean) , size sample code for java.awt.Component.size() definition code for java.awt.Component.size() , toString sample code for java.awt.Component.toString() definition code for java.awt.Component.toString() , transferFocus sample code for java.awt.Component.transferFocus() definition code for java.awt.Component.transferFocus() , transferFocusBackward sample code for java.awt.Component.transferFocusBackward() definition code for java.awt.Component.transferFocusBackward() , transferFocusUpCycle sample code for java.awt.Component.transferFocusUpCycle() definition code for java.awt.Component.transferFocusUpCycle() , update sample code for java.awt.Component.update(java.awt.Graphics) definition code for java.awt.Component.update(java.awt.Graphics) , validate sample code for java.awt.Component.validate() definition code for java.awt.Component.validate()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH

public static final int SCROLLBARS_BOTH
Create and display both vertical and horizontal scrollbars.

Since:
JDK1.1
See Also:
Constant Field Values

SCROLLBARS_VERTICAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY

public static final int SCROLLBARS_VERTICAL_ONLY
Create and display vertical scrollbar only.

Since:
JDK1.1
See Also:
Constant Field Values

SCROLLBARS_HORIZONTAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_HORIZONTAL_ONLY

public static final int SCROLLBARS_HORIZONTAL_ONLY
Create and display horizontal scrollbar only.

Since:
JDK1.1
See Also:
Constant Field Values

SCROLLBARS_NONE sample code for java.awt.TextArea.SCROLLBARS_NONE

public static final int SCROLLBARS_NONE
Do not create or display any scrollbars for the text area.

Since:
JDK1.1
See Also:
Constant Field Values
Constructor Detail

TextArea sample code for java.awt.TextArea() definition code for java.awt.TextArea()

public TextArea()
         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Constructs a new text area with the empty string as text. This text area is created with scrollbar visibility equal to SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH , so both vertical and horizontal scrollbars will be visible for this text area.

Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

TextArea sample code for java.awt.TextArea(java.lang.String) definition code for java.awt.TextArea(java.lang.String)

public TextArea(String sample code for java.lang.String definition code for java.lang.String  text)
         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Constructs a new text area with the specified text. This text area is created with scrollbar visibility equal to SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH , so both vertical and horizontal scrollbars will be visible for this text area.

Parameters:
text - the text to be displayed; if text is null, the empty string "" will be displayed
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

TextArea sample code for java.awt.TextArea(int, int) definition code for java.awt.TextArea(int, int)

public TextArea(int rows,
                int columns)
         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Constructs a new text area with the specified number of rows and columns and the empty string as text. A column is an approximate average character width that is platform-dependent. The text area is created with scrollbar visibility equal to SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH , so both vertical and horizontal scrollbars will be visible for this text area.

Parameters:
rows - the number of rows
columns - the number of columns
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

TextArea sample code for java.awt.TextArea(java.lang.String, int, int) definition code for java.awt.TextArea(java.lang.String, int, int)

public TextArea(String sample code for java.lang.String definition code for java.lang.String  text,
                int rows,
                int columns)
         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Constructs a new text area with the specified text, and with the specified number of rows and columns. A column is an approximate average character width that is platform-dependent. The text area is created with scrollbar visibility equal to SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH , so both vertical and horizontal scrollbars will be visible for this text area.

Parameters:
text - the text to be displayed; if text is null, the empty string "" will be displayed
rows - the number of rows
columns - the number of columns
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()

TextArea sample code for java.awt.TextArea(java.lang.String, int, int, int) definition code for java.awt.TextArea(java.lang.String, int, int, int)

public TextArea(String sample code for java.lang.String definition code for java.lang.String  text,
                int rows,
                int columns,
                int scrollbars)
         throws HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException 
Constructs a new text area with the specified text, and with the rows, columns, and scroll bar visibility as specified. All TextArea constructors defer to this one.

The TextArea class defines several constants that can be supplied as values for the scrollbars argument:

Any other value for the scrollbars argument is invalid and will result in this text area being created with scrollbar visibility equal to the default value of SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH .

Parameters:
text - the text to be displayed; if text is null, the empty string "" will be displayed
rows - the number of rows; if rows is less than 0, rows is set to 0
columns - the number of columns; if columns is less than 0, columns is set to 0
scrollbars - a constant that determines what scrollbars are created to view the text area
Throws:
HeadlessException sample code for java.awt.HeadlessException definition code for java.awt.HeadlessException - if GraphicsEnvironment.isHeadless returns true
Since:
JDK1.1
See Also:
GraphicsEnvironment.isHeadless() sample code for java.awt.GraphicsEnvironment.isHeadless() definition code for java.awt.GraphicsEnvironment.isHeadless()
Method Detail

addNotify sample code for java.awt.TextArea.addNotify() definition code for java.awt.TextArea.addNotify()

public void addNotify()
Creates the TextArea's peer. The peer allows us to modify the appearance of the TextArea without changing any of its functionality.

Overrides:
addNotify sample code for java.awt.TextComponent.addNotify() definition code for java.awt.TextComponent.addNotify() in class TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
See Also:
TextComponent.removeNotify() sample code for java.awt.TextComponent.removeNotify() definition code for java.awt.TextComponent.removeNotify()

insert sample code for java.awt.TextArea.insert(java.lang.String, int) definition code for java.awt.TextArea.insert(java.lang.String, int)

public void insert(String sample code for java.lang.String definition code for java.lang.String  str,
                   int pos)
Inserts the specified text at the specified position in this text area.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
str - the non-null text to insert
pos - the position at which to insert
Since:
JDK1.1
See Also:
TextComponent.setText(java.lang.String) sample code for java.awt.TextComponent.setText(java.lang.String) definition code for java.awt.TextComponent.setText(java.lang.String) , replaceRange(java.lang.String, int, int) sample code for java.awt.TextArea.replaceRange(java.lang.String, int, int) definition code for java.awt.TextArea.replaceRange(java.lang.String, int, int) , append(java.lang.String) sample code for java.awt.TextArea.append(java.lang.String) definition code for java.awt.TextArea.append(java.lang.String)

insertText sample code for java.awt.TextArea.insertText(java.lang.String, int) definition code for java.awt.TextArea.insertText(java.lang.String, int)

@Deprecated
public void insertText(String sample code for java.lang.String definition code for java.lang.String  str,
                                  int pos)
Deprecated. As of JDK version 1.1, replaced by insert(String, int).


append sample code for java.awt.TextArea.append(java.lang.String) definition code for java.awt.TextArea.append(java.lang.String)

public void append(String sample code for java.lang.String definition code for java.lang.String  str)
Appends the given text to the text area's current text.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
str - the non-null text to append
Since:
JDK1.1
See Also:
insert(java.lang.String, int) sample code for java.awt.TextArea.insert(java.lang.String, int) definition code for java.awt.TextArea.insert(java.lang.String, int)

appendText sample code for java.awt.TextArea.appendText(java.lang.String) definition code for java.awt.TextArea.appendText(java.lang.String)

@Deprecated
public void appendText(String sample code for java.lang.String definition code for java.lang.String  str)
Deprecated. As of JDK version 1.1, replaced by append(String).


replaceRange sample code for java.awt.TextArea.replaceRange(java.lang.String, int, int) definition code for java.awt.TextArea.replaceRange(java.lang.String, int, int)

public void replaceRange(String sample code for java.lang.String definition code for java.lang.String  str,
                         int start,
                         int end)
Replaces text between the indicated start and end positions with the specified replacement text. The text at the end position will not be replaced. The text at the start position will be replaced (unless the start position is the same as the end position). The text position is zero-based. The inserted substring may be of a different length than the text it replaces.

Note that passing null or inconsistent parameters is invalid and will result in unspecified behavior.

Parameters:
str - the non-null text to use as the replacement
start - the start position
end - the end position
Since:
JDK1.1
See Also:
insert(java.lang.String, int) sample code for java.awt.TextArea.insert(java.lang.String, int) definition code for java.awt.TextArea.insert(java.lang.String, int)

replaceText sample code for java.awt.TextArea.replaceText(java.lang.String, int, int) definition code for java.awt.TextArea.replaceText(java.lang.String, int, int)

@Deprecated
public void replaceText(String sample code for java.lang.String definition code for java.lang.String  str,
                                   int start,
                                   int end)
Deprecated. As of JDK version 1.1, replaced by replaceRange(String, int, int).


getRows sample code for java.awt.TextArea.getRows() definition code for java.awt.TextArea.getRows()

public int getRows()
Returns the number of rows in the text area.

Returns:
the number of rows in the text area
Since:
JDK1
See Also:
setRows(int) sample code for java.awt.TextArea.setRows(int) definition code for java.awt.TextArea.setRows(int) , getColumns() sample code for java.awt.TextArea.getColumns() definition code for java.awt.TextArea.getColumns()

setRows sample code for java.awt.TextArea.setRows(int) definition code for java.awt.TextArea.setRows(int)

public void setRows(int rows)
Sets the number of rows for this text area.

Parameters:
rows - the number of rows
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the value supplied for rows is less than 0
Since:
JDK1.1
See Also:
getRows() sample code for java.awt.TextArea.getRows() definition code for java.awt.TextArea.getRows() , setColumns(int) sample code for java.awt.TextArea.setColumns(int) definition code for java.awt.TextArea.setColumns(int)

getColumns sample code for java.awt.TextArea.getColumns() definition code for java.awt.TextArea.getColumns()

public int getColumns()
Returns the number of columns in this text area.

Returns:
the number of columns in the text area
See Also:
setColumns(int) sample code for java.awt.TextArea.setColumns(int) definition code for java.awt.TextArea.setColumns(int) , getRows() sample code for java.awt.TextArea.getRows() definition code for java.awt.TextArea.getRows()

setColumns sample code for java.awt.TextArea.setColumns(int) definition code for java.awt.TextArea.setColumns(int)

public void setColumns(int columns)
Sets the number of columns for this text area.

Parameters:
columns - the number of columns
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if the value supplied for columns is less than 0
Since:
JDK1.1
See Also:
getColumns() sample code for java.awt.TextArea.getColumns() definition code for java.awt.TextArea.getColumns() , setRows(int) sample code for java.awt.TextArea.setRows(int) definition code for java.awt.TextArea.setRows(int)

getScrollbarVisibility sample code for java.awt.TextArea.getScrollbarVisibility() definition code for java.awt.TextArea.getScrollbarVisibility()

public int getScrollbarVisibility()
Returns an enumerated value that indicates which scroll bars the text area uses.

The TextArea class defines four integer constants that are used to specify which scroll bars are available. TextArea has one constructor that gives the application discretion over scroll bars.

Returns:
an integer that indicates which scroll bars are used
Since:
JDK1.1
See Also:
SCROLLBARS_BOTH sample code for java.awt.TextArea.SCROLLBARS_BOTH definition code for java.awt.TextArea.SCROLLBARS_BOTH , SCROLLBARS_VERTICAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY definition code for java.awt.TextArea.SCROLLBARS_VERTICAL_ONLY , SCROLLBARS_HORIZONTAL_ONLY sample code for java.awt.TextArea.SCROLLBARS_HORIZONTAL_ONLY definition code for java.awt.TextArea.SCROLLBARS_HORIZONTAL_ONLY , SCROLLBARS_NONE sample code for java.awt.TextArea.SCROLLBARS_NONE definition code for java.awt.TextArea.SCROLLBARS_NONE , TextArea(java.lang.String, int, int, int) sample code for java.awt.TextArea.TextArea(java.lang.String, int, int, int) definition code for java.awt.TextArea.TextArea(java.lang.String, int, int, int)

getPreferredSize sample code for java.awt.TextArea.getPreferredSize(int, int) definition code for java.awt.TextArea.getPreferredSize(int, int)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize(int rows,
                                  int columns)
Determines the preferred size of a text area with the specified number of rows and columns.

Parameters:
rows - the number of rows
columns - the number of columns
Returns:
the preferred dimensions required to display the text area with the specified number of rows and columns
Since:
JDK1.1
See Also:
Component.getPreferredSize() sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize()

preferredSize sample code for java.awt.TextArea.preferredSize(int, int) definition code for java.awt.TextArea.preferredSize(int, int)

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  preferredSize(int rows,
                                          int columns)
Deprecated. As of JDK version 1.1, replaced by getPreferredSize(int, int).


getPreferredSize sample code for java.awt.TextArea.getPreferredSize() definition code for java.awt.TextArea.getPreferredSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getPreferredSize()
Determines the preferred size of this text area.

Overrides:
getPreferredSize sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the preferred dimensions needed for this text area
Since:
JDK1.1
See Also:
Component.getPreferredSize() sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize()

preferredSize sample code for java.awt.TextArea.preferredSize() definition code for java.awt.TextArea.preferredSize()

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  preferredSize()
Deprecated. As of JDK version 1.1, replaced by getPreferredSize().

Overrides:
preferredSize sample code for java.awt.Component.preferredSize() definition code for java.awt.Component.preferredSize() in class Component sample code for java.awt.Component definition code for java.awt.Component

getMinimumSize sample code for java.awt.TextArea.getMinimumSize(int, int) definition code for java.awt.TextArea.getMinimumSize(int, int)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize(int rows,
                                int columns)
Determines the minimum size of a text area with the specified number of rows and columns.

Parameters:
rows - the number of rows
columns - the number of columns
Returns:
the minimum dimensions required to display the text area with the specified number of rows and columns
Since:
JDK1.1
See Also:
Component.getMinimumSize() sample code for java.awt.Component.getMinimumSize() definition code for java.awt.Component.getMinimumSize()

minimumSize sample code for java.awt.TextArea.minimumSize(int, int) definition code for java.awt.TextArea.minimumSize(int, int)

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  minimumSize(int rows,
                                        int columns)
Deprecated. As of JDK version 1.1, replaced by getMinimumSize(int, int).


getMinimumSize sample code for java.awt.TextArea.getMinimumSize() definition code for java.awt.TextArea.getMinimumSize()

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getMinimumSize()
Determines the minimum size of this text area.

Overrides:
getMinimumSize sample code for java.awt.Component.getMinimumSize() definition code for java.awt.Component.getMinimumSize() in class Component sample code for java.awt.Component definition code for java.awt.Component
Returns:
the preferred dimensions needed for this text area
Since:
JDK1.1
See Also:
Component.getPreferredSize() sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize()

minimumSize sample code for java.awt.TextArea.minimumSize() definition code for java.awt.TextArea.minimumSize()

@Deprecated
public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  minimumSize()
Deprecated. As of JDK version 1.1, replaced by getMinimumSize().

Overrides:
minimumSize sample code for java.awt.Component.minimumSize() definition code for java.awt.Component.minimumSize() in class Component sample code for java.awt.Component definition code for java.awt.Component

paramString sample code for java.awt.TextArea.paramString() definition code for java.awt.TextArea.paramString()

protected String sample code for java.lang.String definition code for java.lang.String  paramString()
Returns a string representing the state of this TextArea. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Overrides:
paramString sample code for java.awt.TextComponent.paramString() definition code for java.awt.TextComponent.paramString() in class TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
Returns:
the parameter string of this text area

getAccessibleContext sample code for java.awt.TextArea.getAccessibleContext() definition code for java.awt.TextArea.getAccessibleContext()

public AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext  getAccessibleContext()
Returns the AccessibleContext associated with this TextArea. For text areas, the AccessibleContext takes the form of an AccessibleAWTTextArea. A new AccessibleAWTTextArea instance is created if necessary.

Specified by:
getAccessibleContext sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() in interface Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible
Overrides:
getAccessibleContext sample code for java.awt.TextComponent.getAccessibleContext() definition code for java.awt.TextComponent.getAccessibleContext() in class TextComponent sample code for java.awt.TextComponent definition code for java.awt.TextComponent
Returns:
an AccessibleAWTTextArea that serves as the AccessibleContext of this TextArea