JComponent () { boolean isDestinationVisible = getSourceRoots().size() > 1; myDestinationFolderCB.setVisible(isDestinationVisible); myTargetDestinationLabel.setVisible(isDestinationVisible); return null; }