GridBag Pane

 

Features

This example implements a flexible way of displaying UI components using a simulated GridBag layout. The visual components are represented by sequentially numbered pushbuttons. They show the different ways in which components behave when you split the space horizontally and vertically, or resize components.

 

In detail, you will learn how to:

·         Assign UI components to a GridLayout pane

·         Specify the initial width and height of visual components

·         Implement horizontal and vertical alignment

·         Specify the behavior of each component during resizing

 

Source code

For the appropriate source code, refer to the file GridBagTab.class or just click here.