content

Introduction

Part 1: About GridBagLayout
Overview of GridBagLayout
   What is GridBagLayout?
   What is the component's display area?
   What are GridBagConstraints?
   Why is GridBagLayout so complicated?
   Why use GridBagLayout?
Simplifying GridBagLayout
   Sketch your design on paper first
   Use nested panels and layouts
   Use the JBuilder UI designer
   Prototype your UI in XYLayout

Part 2: Creating a GridBagLayout in JBuilder
About the design
Step 1: Design the layout structure
Step 2: Create a project for this tutorial
Step 3: Add the components to the containers
Step 4: Convert the outer panel to GridBagLayout
Step 5: Convert the upper panels to GridBagLayout
Step 6: Convert the lower panel to GridLayout
Step 7: Make final adjustments
Conclusion

Part 3: Tips and Techniques
Setting individual constraints in the UI designer
   Anchor
   Fill
   Insets
   Gridwidth, Gridheight
   Ipadx, Ipady
   Gridx, Gridy
   Weightx, Weighty
Using drag and drop to edit constraints
   Dragging a component within its display area
   Dragging a component to an empty cell
   Dragging a component to an occupied cell
   Dragging a large component into a small cell
   Dragging the black sizing nibs
   Adding components
Miscellaneous tips
   Switch back to XYLayout for major adjustments
   Remove Weights and Fill before making adjustments
Making existing GridBagLayout code visually designable
   Differences in code
   Modifying code to work in the UI designer
Code generated by JBuilder in Part 2
Other resources on GridBagLayout
JDK 1.2 API Reference

© 1997, 1999 by INPRISE Corporation, Inc.
All Rights Reserved