How does creating a horizontal group work?

Please explain how the creation of a horizontal group works.

layout.setHorizontalGroup(layout.createSequentialGroup()
            .addComponent(labelX1)
            .addGroup(layout.createParallelGroup(LEADING)
                    .addComponent(labelX2)
                    .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(LEADING)
                                    .addComponent(labelZ1)
                                    .addComponent(labelX2))
                            .addGroup(layout.createParallelGroup(LEADING)
                                    .addComponent(inputX1)
                                    .addComponent(inputX2))))
            .addGroup(layout.createParallelGroup(LEADING)
                    .addComponent(inputZ1)
                    .addComponent(inputZ2))
    );
Asked on January 19, 2020 in Programming.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.