您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

previous.gif
 (3087 bytes) next.gif
 (2959 bytes)


Content Index Content Page # 24

Types of layout manager

The 'flow' layout manager places objects from left to right and top to bottom. The 'grid' is similar, but it attempts to line up objects on a grid of a fixed size. This will usually result in objects being spaced more widely than the 'flow' layout.

A 'border' layout has five regions: the centre and the four borders. Objects can be placed specifically into any of these regions.

The 'card' layout is different in that it only displays one object at a time (like a stack of cards). Methods are provided to select which object is currently on 'top', and therefore visible.

a more sophisticated layout manager is GridBagLayout, see 13.15 of Chapter 13 of Deitel and Deitel for further information

Back to top

basicline.gif (170 bytes)