3 ms·
> You could just as easily make a giant mess in retained-mode by not making reusable components. Classic example: the Swing library for Java has layout manager
by HelloNurse 3y ago
> You could just as easily make a giant mess in retained-mode by not making reusable components.
Classic example: the Swing library for Java has layout managers, which help panels decide where their children go, and the most "powerful" one is the GridBagLayout, roughly equivalent to HTML tables with extra features and a favorite of GUI builders.
It can be used to make an unmaintainable monster layout of most of a complex window in a single panel, to structure a trivial reusable component that would be easier to write with a simpler layout manager, or to try and design intermediate level components that are self-contained and benefit from general layout configuration, with no guidance at all from the library or from tools.