Migpanel is a project mainly written in Scala, it's free.
A tiny Scala wrapper for the Swing Mig Layout Manager
MigPanel is a thin scala wrapper for the MigLayout. Use of this wrapper allows type checking the MigLayout constraints.
object MyPanel extends MigPanel {
add(new Label("Hello"), Span >> AlignX(10 cm) >> GapBottom(10))
add(new Label("MigLayout"), Skip(2) >> GapLeft(10 px))
add(new Label("Wrapper"), Span >> AlignX(10 cm) >> GapBottom(10))
}
Specifying unsupported constraints can be done using RawConstraint. There is an implicit conversion from String to RawConstraint allowing:
add(new Label("Hello"), Span >> "shrinkprio 50"))
Credits to hotzen for writing the initial MigPanel which this tiny DSL was built on top of.