JPanel (@NlsContexts.DialogTitle final String chooserTitle, @NlsContexts.Label final String treeLabel, final ListTable table, boolean removeHeader, @NonNls String... ancestorClasses) { if (removeHeader) table.setTableHeader(null); final JPanel panel = createAddRemoveTreeClassChooserPanel(table, chooserTitle, ancestorClasses); return UI.PanelFactory.panel(panel).withLabel(treeLabel).moveLabelOnTop().resizeY(true).createPanel(); }