(Automatically generated from BeanInfo)
Generated Object
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.
Attributes
Events
Content
Usage
Examples
Creating a frame with a panel that has a BoxLayout with Y_AXIS
| Code Block |
|---|
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
| Code Block |
|---|
boxLayout(axis:BoxLayout.Y_AXIS) |
can be replaced with
| Code Block |
|---|
boxLayout(axis:BoxLayout.X_AXIS) |
| Code Block |
|---|
boxLayout(axis:BoxLayout.PAGE_AXIS) |
etc..