6 つのパネルがあり、すべてグリッド レイアウトを使用しています。そして、gridbaglayoutを使用してそれらをまとめました。これが私が望んでいたデザインです
「2番目」のパネルは右に遠くなり、3番目のパネルは左側に大きく圧迫され、惨事でした。これがグリッドバッグレイアウトの私のコードです
c.gridx = 0; c.gridy = 0;
add (first,c);
c.gridx = 2; //so that the second panel starts from the center and is divided evenly with the first panel
add(second,c);
c.gridx = 0; c.gridy = 1;
add(third,c);
c.gridx = 1;
add(fourth,c);
c.gridx = 2;
add(fifth,c);
c.gridx = 3;
add(sixth,c);
どんな助けでも大歓迎です。