Collapsible containers?
According to the tool guide, when a container is hidden, its children are also hidden, but they
retain their own visibility values .... this includes their preferredSize or size that the layout manager determines. I'm looking for a way to simulate collapsing a container object when it is hidden, and my initial thoughts on how to do this is by creating a variable for the container, setting its preferredSize property to [0,0], and then when a control (a radiobutton, in my particular case) is clicked a function is called and the container object is populated with the child objects and the visible property set to true. Then, when another radiobutton is clicked, the same function is called and in this instance the child elements of the container object would be removed, the preferredSize property of the container would be set again to [0,0], and the visible property of the container would then be set to false.
In trying to collapse a container in the manner described, the one thing I don't know how to do is to update the dialog to reflect the changes made to the target container.
Is my logic right on how to do this, or is there a more efficient way of accomplishing this?
JJ