return new Dimensions(preferredWidth, preferredHeight);
}
@Override
public void layout() {
Expander expander = (Expander)getComponent();
Component content = expander.getContent();
int width = getWidth();
int height = getHeight();
int titleBarHeight = titleBarTablePane.getPreferredHeight(-1);
titleBarTablePane.setSize(Math.max(width - 2, 0), titleBarHeight);
titleBarTablePane.setLocation(1, 1);
if (content != null) {
if (expander.isExpanded()
|| expandTransition != null) {
int contentWidth = Math.max(width - (2 + padding.left + padding.right), 0);
int contentHeight = Math.max(height - (3 + padding.top + padding.bottom + titleBarHeight), 0);
content.setSize(contentWidth, contentHeight);