target.setPreferredSize(source.isPreferredSizeSet() ? source.getPreferredSize() : null);
target.setMinimumSize(source.isMinimumSizeSet() ? source.getMinimumSize() : null);
target.setMaximumSize(source.isMaximumSizeSet() ? source.getMaximumSize() : null);
if (source instanceof JComponent) {
GridCell orig = GridCell.getExisting((JComponent)source);
if (orig != null) {
GridCell cell = GridCell.get((JComponent)target);
cell.setWidthPolicy(orig.getWidthPolicy());
cell.setHeightPolicy(orig.getHeightPolicy());
}
// TF:03/11/2008:We need to clone specific client properties too, otherwise some things won't work.
ArrayFieldCellHelper.cloneComponentArrayParts((JComponent)source, (JComponent)target);
}
}