I am creating an application which has a scrollable and scalable (zoomable) view. Inside this view I want to place other components (most of them customized JPanel
s and JInternalFrame
s).
Things such as fonts and borders, and sub-elements such as buttons don't need to be scalable. Only dimensions and position of container components should be.
What do you think, what is a good way to implement scalable components?
EDIT: I'm talking about resizing the entire layout including all components. Please think of something such as a visual UML editor with zoom functionality.
My alternatives are:
- Create a custom layout manager;
- Create custom resizeable sub-components;
- Create a custom container which would take care of resizing its sub-components;
- Do something else?
Possible problems:
- Boilerplate code;
- Necessity to provide access to additional custom properties of components;
- Not straightforward (inconsistent) representation of components in code.
- Something else?