Advanced GUI Applications Part I
- Contents
- The Swing and AWT Class Hierarchy
- Read Only Text Fields
- Lists
- Combo Boxes
- Displaying Images in Labels and Buttons
- Mnemonics
- Tool Tips
- File Choosers
- Color Choosers
- Menus
- Text Areas
- Fonts
- Sliders
- Look and Feel
The Swing
and AWT
Class Hierarchy
Read Only Text Fields
By default a text field is editable.
The
JTextField
component has a method namedsetEditable
:The
setEditable
method must be passedfalse
to make the field read-only.