CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades

Layout

Controls and layout managers
Components
Summary

A frame with several new types of components

Swing controls

Control Class Description
Text area JTextArea Lets the user enter more than one line of text.
Check box JCheckBox Lets the user select or deselect an option.
Radio button JRadioButton Lets the user select an option from a group of options.
List JList Lets the user select one or more items from a list of items.
Combo box JComboBox Lets the user select a single item from a drop-down list of items. A combo box can also let the user enter text into the text portion of the combo box.

Components that enhance controls

Component Class Description
Border JBorder Can be used to visually group components or to enhance the appearance of an individual component.
Scroll pane JScrollPane Contains scroll bars that can be used to scroll through the contents of other controls. Scroll panes are typically used with text area and list controls.
Previous | Summary | Text areas | Scroll panes | Check boxes | Radio buttons | Borders | Combo boxes | Event listeners | Lists | Multiple selections in a list | List models | Next