JPanel () { JPanel findWhatPanel = createFindWhatPanel(); if (findWhatPanel != null) { addUsagesOptions(findWhatPanel); if (myFindOptionsCount > 2) { JPanel panel = new JPanel(new BorderLayout()); panel.add(new Title(FindBundle.message("find.what.group"), JBUI.Borders.empty(4, 0, 8, 0), null), BorderLayout.NORTH); findWhatPanel.setBorder(JBUI.Borders.emptyLeft(17)); panel.add(findWhatPanel, BorderLayout.CENTER); findWhatPanel = panel; } } JComponent scopePanel = createSearchScopePanel(); if (scopePanel != null) { JPanel panel = new JPanel(new BorderLayout()); if (findWhatPanel != null) { panel.add(findWhatPanel, BorderLayout.NORTH); scopePanel.setBorder(JBUI.Borders.emptyTop(9)); } panel.add(scopePanel, BorderLayout.SOUTH); return panel; } else if (findWhatPanel != null && myFindOptionsCount <= 2) { findWhatPanel.setBorder(JBUI.Borders.emptyTop(9)); } return findWhatPanel; }