JPanel () { if (mySearchForTextOccurrencesAvailable || myIsShowInNewTabVisible) { JPanel findWhatPanel = new JPanel(); findWhatPanel.setLayout(new BoxLayout(findWhatPanel, BoxLayout.Y_AXIS)); return findWhatPanel; } return null; }