I am currently wrestling with Swing custom LayoutManagers. The book I am using gives a pretty simple example but I cannot follow the sequence of methods that are fired off when a panel has a layout manager set to it and when a component is added to it. Does anybody know how the methods are fired?
The LayoutManager has 5 methods:
addLayoutComponent(String name, Component comp)
layoutContainer(Container parent),
minimumLayoutSize(Container parent),
preferredLayoutSize(Container parent)
removeLayoutComponent(Component parent)
Which of these are executed when the Layout is set to a panel (p1.setLayout(LayoutManager mgr) and when a component is added to the panel. This would sure make it easier to understand the example I am working through. Or could you direct me to some documentation that would explain this.
Thanks in advance
Jeff Sulman
The LayoutManager has 5 methods:
addLayoutComponent(String name, Component comp)
layoutContainer(Container parent),
minimumLayoutSize(Container parent),
preferredLayoutSize(Container parent)
removeLayoutComponent(Component parent)
Which of these are executed when the Layout is set to a panel (p1.setLayout(LayoutManager mgr) and when a component is added to the panel. This would sure make it easier to understand the example I am working through. Or could you direct me to some documentation that would explain this.
Thanks in advance
Jeff Sulman