Is there a clean way to propogate changes made to a JPanel (components being added,removed, resized..) to the ancestors, preferrably the top-level (internal) frame so i can call pack() to make it resize..
i was planning on building a system my self based on some kind of LayoutChangeHandler interface that you can register on a panel but wanted to check first if there wasn't something built in already
java.awt.event.ComponentListener for resizing, moving, showing and hiding of components. java.awt.event.ContainerListener for adding and removing components to and from a container. The latter gives you a ContainerEvent which even tells you which Component was added/removed.