RigidArea
Empty space of a fixed size, width by height - the rigid area of Box.createRigidArea.
Its minimum, preferred and maximum size are all that size, so a PanelLayout.Box panel or a ToolBar holds it at exactly that size - which is what makes it the gap between two items:
Panel(PanelLayout.Box(axis = BoxLayout.X_AXIS)) {
Button(text = "Cancel", onClick = { ... })
RigidArea(width = 8, height = 0)
Button(text = "OK", onClick = { ... })
}Content copied to clipboard
Parameters
width
the horizontal size
height
the vertical size
modifier
the SwingModifier applied to the underlying component