Skip to content

Is it possible to expose and use ids when layouts are shared? #74

@vlsi

Description

@vlsi

Use case: https://stackoverflow.com/questions/19589694/miglayout-set-equal-column-width-in-nested-panels-with-layoutmanagers

What if "nested" layout could expose its component and sizegroup ids to the parent layout?

In other words, if the children component is JLabel + JTextField, then the nested layout could expose label and field size groups.

Then the outer layout could somehow connect inner's sizegroup with its own ones.
For instance:

inner1; // panel with MigLayout, label1: textfield1
inner2; // panel with MigLayout, label2: textfield2

outer.add(inner1, "sizegroupmap outerlabel=child.label");
outer.add(inner2, "sizegroupmap outerlabel=child.label");

So far it looks like MigLayout requires all the individual elements (e.g. JTextField) to be put into a single layout grid. Are there best practices for (not?) using nested layouts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions