新しいものを作成し、そのためにグループレイアウトJPanelを使用します。
このようにhttp://img163.imageshack.us/img163/1403/capturadepantalla201001bo.png
グループレイアウトを使用すると、水平グループに含まれるコンポーネントと垂直グループに含まれるコンポーネントを指定できます。
c1, c2, c3
c4, c5, c6
panel[ c7, c8, c9 ]
上記の画像をレイアウトする方法は次のとおりです。
// Layout Horizontal components
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent( c1 )
.addComponent( c4 )
).addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent( c2 )
.addComponent( c5)
).addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent( c3 )
.addComponent( c6 )
)
);
// Layout vertical components
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent( c1 )
.addComponent( c2 )
.addComponent( c3 )
).addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent( c4 )
.addComponent( c5 )
.addComponent( c6 )
)
);
southPanel.add( panel ); // the start-end dates
southPanel.add( bookIt, BorderLayout.SOUTH ); // the enter your name...
試してみる。