I am currently coding on a swing layout. Here is what it looks like right now:
And this is what it should look like:
right now the Button is on the wrong Place:
Here is my code:
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(header)//table header
.addComponent(tableG)//here comes the table
.addGroup(layout.createParallelGroup()
.addComponent(b3)//button1
.addComponent(b4)))//button2
);
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(b3)//button1
.addComponent(b4)) //button2
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(header)//tableheader
.addComponent(tableG))//table
);
layout.linkSize(SwingConstants.HORIZONTAL, b3, b4);
Why is my Button over my table?
I appreaciate your answers!!!