(Automatically generated from BeanInfo)
A javax.swing.BoxLayout is returned, unless the user passes in a subclass of BoxLayout as the value argument, in which case the value argument is returned.
def swing = new SwingBuilder()
swing.edt{
frame( title:'Frame Title',
id: 'frameID',
location: [700,200],
pack:true,
defaultCloseOperation: WindowConstants.DISPOSE_ON_CLOSE,
show:true){
panel(border:new EmptyBorder(2,2,2,2)){
boxLayout(axis:BoxLayout.Y_AXIS)
label("Top Label")
label("Bottom Label")
}
}
} |
The line
boxLayout(axis:BoxLayout.Y_AXIS) |
can be replaced with
boxLayout(axis:BoxLayout.X_AXIS) |
boxLayout(axis:BoxLayout.PAGE_AXIS) |
etc..