Size provides special sizing values for JDance layout cells. Instead of choosing a fixed pixel height, a cell can let its content determine its height or use automatic sizing.
For the complete API reference, visit https://doc.jdance.org.
Size.CONTENT is useful for rows containing headings, labels, and descriptions. A content-sized cell occupies the height necessary to show its component.
The preview above uses a small amount of space so the behavior is visible even in a narrow documentation panel.
Different cells can use different sizing rules within the same layout. This is useful when a heading should fit its text while another area should participate in automatic sizing.
Fixed dimensions are predictable but can clip or crowd content. Content-driven dimensions accommodate variation, including longer labels and text wrapping. Automatic sizing is another option determined by the layout context.
The same idea can also be expressed as a compact Java snippet without requiring a live preview.
Remember that Size.CONTENT applies to the cell, while the component itself may also have width or height settings. The surrounding layout still determines the available space.
These examples focus on the day-to-day use of Size. The full API documentation contains additional options, inherited properties and complete method signatures.
Visit https://doc.jdance.org for the full reference.