JComponent () { if (myPanel == null) { myPanel = new JPanel(new CardLayout()); myPanel.setBorder(BorderFactory.createEtchedBorder()); myPanel.add(createProgressPanel(), PROGRESS_PANEL); myPanel.add(createResultsPanel(), RESULTS_PANEL); } return myPanel; }