Text components are available for simple text and for enhanced text and editing panes. VisualAge provides text beans from Swing and AWT packages. Basic text beans from the Abstract Windowing Toolkit (AWT) are provided in the Java class libraries project, in the java.awt package. Enhanced text beans from the Java Foundation Classes (JFC) library are provided in the JFC class libraries project, in the com.sun.java.swing and com.sun.java.swing.text packages.
The following beans provide simple text components:
Bean | Description |
---|---|
JLabel (Swing) or Label (AWT) | A label, usually to identify another component |
JPasswordField (Swing) | A text field for sensitive data |
JTextArea (Swing) or TextArea (AWT) | A multiline text area |
JTextField (Swing) or TextField (AWT) | A single-line text field |
Adding a text component
Pane and panel beans
Beans for visual composition