I am writing a library where i am passed in a Container (usually JPanel)
and have an xml specification for different controls, their locations, size and other attributes. i have to create those controls at runtime and add it to the component. What’s a good way to handle resizing of the parent Container?
If the XML specifies the absolute locations then there is probably no way to elegantly resize the components. You could create a custom LayoutManager that would scale them linearly but that would probably look bad for most components.
EDIT: Here is a version that might be helpful: