JPanel () { myLazyGeneratorPeer = createLazyPeer(); final JPanel mainPanel = new JPanel(new BorderLayout()); final JLabel label = createErrorLabel(); final JButton button = createActionButton(); button.addActionListener(createCloseActionListener()); Disposer.register(this, () -> UIUtil.dispose(button)); final JPanel scrollPanel = createAndFillContentPanel(); initGeneratorListeners(); registerValidators(); final JBScrollPane scrollPane = new JBScrollPane(scrollPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setBorder(JBUI.Borders.empty()); mainPanel.add(scrollPane, BorderLayout.CENTER); final JPanel bottomPanel = new JPanel(new BorderLayout()); bottomPanel.setName(BOTTOM_PANEL); bottomPanel.add(label, BorderLayout.NORTH); bottomPanel.add(button, BorderLayout.EAST); mainPanel.add(bottomPanel, BorderLayout.SOUTH); return mainPanel; }