GridBagLayout Tutorial

Introduction

This is an indepth tutorial that explains GridBagLayout, and demonstrates how to create a GridBagLayout UI container using the JBuilder visual design tools. The goal of this tutorial is to give you a thorough understanding of how GridBagLayout works in JBuilder, and to show you how to simplify GridBagLayout design. While the information here is aimed at working with JBuilder, much of it also applies to working with GridBagLayout in general.

The images in this tutorial were captured on the Windows platform. This does not, however, affect the validity of the tutorial for other platforms, as the basic functionality of JBuilder and GridBagLayout is the same on all platforms.

The GridBagLayout Tutorial contains animations that demonstrate the behavior of GridBagLayout. These animations can only be viewed online in a JavaScript enabled browser, such as Netscape, or Internet Explorer. Each place a projector icon appears indicates an animation sequence you can view in the online version.

A browser version of the JBuilder documentation is available in the JBuilder /doc directory. For directions on viewing the documentation in a browser, see "How to get Help" in Getting Started.

Important: This tutorial uses XYLayout for prototyping the UI. If you use JBuilder Foundation edition, substitute null layout wherever XYLayout is mentioned.

The GridBagLayout Tutorial is divided into three sections: