Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added an exmple using BoxLayout

...

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:'Custom Report',
		id: 'customReportFrame',
		location: [700,200],
		pack:true,
		defaultCloseOperation: WindowConstants.DISPOSE_ON_CLOSE,
		windowClosing:{
			welcomeFrame.enabled = true
		},
		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..