posted 22 years ago
Hi Amish,
The example points out the difference between LayoutManager and LayoutManager2 interfaces. All objects that implement LayoutManager2 require constraints to perform the actual layout. No constraints = no layout = no visible objects!
The following layouts implement LayoutManager2:
CardLayout, GridBagLayout, BorderLayout, and BoxLayout
This is also another reason why the layout should be set first and then components inserted into it. Then the problem will not be an issue at all!
Regards,
Manfred.