# Java Notes

# Absolute Layout

## You can specify x, y, width, height for each component, but...

Although the layout can be set to null and the coordinates and size of each component can be explicitly set, this is a bad idea.

- Internationalizing (eg, changing the language on a label) is impossible. The size of the label should change, as it will with layout managers, but not with absolute layout.
- Font size changes make the controls look wrong. Fonts are not under your complete control for several reasons.
  - The user may choose different default fonts.
  - Font handling by Java differs from release to release. This has received little publicity, but the exact rendering has changed several times, most recently in Java 5.
  Layouts accomodate to these changes, absolute layout doesn't'.
- Components like text fields can not expand/contract if the user resizes the window. Layouts permit this.
- Layout changes are difficult.
- It looks ignorant. When I see it I know the programmer is doing it because the don't understand layouts.