index (464)


Chapter 16: LayoutManagers Chapter 16: LayoutManagers You may have noticed that despite the GUI widgets, the last few applets didn't look so hot. Strings were sometimes cut off. Buttons lay on top of labels, and other things weren't just the way you wanted them. LayoutManagers provide control over the locations of individual widgets in Java applets. Since you're never sure how big an area you'll have to work with or how it will be shaped, most of the controls are relative in nature. That is you say this widget should be above that one or left aligned with the other one; but you don't say that this widget's upper left hand corner is at pixel (42, 65). In this chapter you'll learn the five basic LayoutManagers included in the AWT and some additional tricks for handling complicated applets. Topics Covered Include FlowLayout BorderLayout CardLayout GridLayout GridBagLayout Nesting Panels for Multiple Layouts The Examples Example 16.1: FlowLayout Example 16.2: GridLayout Example 16.3: Panels Example 16.4: Calculator Example 16.5: Gridbag Layout Example 16.6: Absolute Positioning Examples from Other Chapters [ Cafe Au Lait | Books | Trade Shows | Links | FAQ | Tutorial | User Groups ] Copyright 1996 Elliotte Rusty Harold elharo@sunsite.unc.edu Last Modified July 23, 1996

Wyszukiwarka

Podobne podstrony:
index
index
index
index
index
index
index
index

więcej podobnych podstron