- MigLayout notes
- Can handle Grid-based, Flow layout, docking layout, Absolute positioning, and Relative positioning
- String based config is more compact
- Invalid strings throw RuntimeException
- API based config is more typesafe
- Unlike
SpringLayoutandGroupLayout, component constraints are set using.add(component, ...)- Layout constraints are set when constructing the
MigLayout
- Layout constraints are set when constructing the
- Comes with helpful debug features
- Replace
BorderLayoutusing Docking - Replace
FlowLayoutusingnogrid- MigLayout can also flow vertically (via
flowy) unlikeFlowLayout - TODO: I couldn't get this to work
- MigLayout can also flow vertically (via
LCmeans component layout constraint (highest level)- see debug
ACmeans component axis constraint (either column or row)CCmeans component constraint (lowest level)- Useful for overriding minimum/preferred/maximum constraints
- Useful for alignment when spanning/splitting cells
- Centering a
JLabelorJTextFieldrequiressetHorizontalAlignment(SwingConstants.CENTER)
- TODO