JComponent () { final JPanel southPanel = new JPanel(new BorderLayout()); final JPanel panel = new JPanel(new GridLayout(1, 0, 5, 0)); panel.add(myPrevious); panel.add(myNext); panel.add(myFinish); panel.add(myCancel); if (ApplicationManager.getApplication() != null) { // we won't be able to show help if there's no HelpManager panel.add(myHelp); } southPanel.add(panel, BorderLayout.EAST); southPanel.setBorder(BorderFactory.createEmptyBorder(8, 0, 0, 0)); return southPanel; }