Java GUI Basics
Swing
| Mouse Event |
Description |
| mouse pressed |
The mouse button is pressed down |
| mouse released |
The mouse button is released |
| mouse clicked |
The mouse button is pressed down
and released without moving the mouse in between |
| mouse entered |
The mouse pointer is moved onto
(over) a component |
| mouse exited |
The mouse pointer is moved off a
component |
| Mouse Motion Event |
Description |
| mouse moved |
The mouse is moved |
| mouse dragged |
The mouse is moved while the
mouse button is pressed down |
| Layout Manager |
Description |
| Border Layout |
Organizes components into 5
areas North, South, East, West & Center (also called PAGE_START,
PAGE_END, LINE_START, LINE_END) |
| Box Layout |
Organizes components into a
single row or column |
| Card Layout |
Organizes components into one
area such that only one is visible at any time |
| Flow Layout |
Organizes components from left
to right, starting new rows as necessary |
| Grid Layout |
Organizes components into a grid
of rows and columns |
| GridBag Layout |
Organizes components into a grid
of cells, allowing components to span more than one cell |
| Border |
Description |
| Empty Border |
Puts buffering space around the
edge of a component, but otherwise has no visual effect |
| Line Border |
A simple line surrounding the
component |
| Etched Border |
Creates the effect of an etched
groove around a component |
| Bevel Border |
Creates the effect of a
component raised above the surface or sunken below it |
| Titled Border |
Includes a text title on or
around the border |
| Matte Border |
Allows the size of each edge to
be specified. Uses either a solid color an an image. |
| Compound Border |
A combination of two borders |