Hello!
I wonder if there's a good documentation (or a (viewable) ebook) about the lifecycle of Swing components.
Is "lifecycle" the correct term, anyway?
I hope to find answers to question such as:
- How, when, in which order painting methods are called?
- How, when, which events are called by whom?
- What is the exact sequence of method calls for component creation?
From time to time I encounter strange behavior of my apps, for example:
- ComponentListener's resize event is called before setVisible(true)
(so that root pane has negative dimensions!) - Some components are laid out correctly only after resizing the JFrame by hand
- Changing a super class from JPanel to JLayeredPane causes my class to be laid out differently inside an other container.
- And lot of other strange things...