Using the BoxLayout2 Manager

BoxLayout2 is simply a wrapper for Java Swing BoxLayout. The BoxLayout2 wraps the BoxLayout using the JavaBean specification. This allows JBuilder to use the Inspector to assign a layout manager. BoxLayout2 combines the functionality of FlowLayout and VerticalLayout into one layout manager.

Creating a more lightweight container that uses BoxLayout2, you can achieve some layouts for which the more complex GridBagLayout is often used. BoxLayout2 also can be used as a replacement for GridLayout or BorderLayout. The big difference between this layout manager and the others is that the BoxLayout2 respects each component’s maximum size and x,y alignment.

Get Borland® JBuilder™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.