# Java: Components

Components (also known as "widgets") are the basic user interface elements the user interacts with: labels, buttons, text fields, ... Components are placed in a container (eg, JPanel). The visual arrangement of the components depends on the container's layout. When the user does something to a component, the component's listener is sent an event.

Vanilla Java. The most important components to learn for simple programs are: JLabel, JButton, and JTextField. Learn these first.

## Input Components

- Buttons ( JButton, Radio Buttons, JCheckBox)
- Text (JTextField, JTextArea)
- Menus (JMenuBar, JMenu, JMenuItem)
- Sliders (JSlider)
- JComboBox (uneditable) (JComboBox)

## Information Display Components

- JLabel
- Progress bars (JProgressBar) - no notes
- Tool tips (using JComponent's `setToolTipText(s)` method)

## Choosers

- File chooser (JFileChooser)
- Color chooser (JColorChooser) - no notes

## More complex displays

- Tables (JTable) - no notes
- Trees (JTree) - no notes
- Formatted Text - no notes