JComponent () { JPanel panel = createIconPanel(); JPanel messagePanel = createMessagePanel(); panel.add(messagePanel, BorderLayout.CENTER); if (myComment != null) { return UI.PanelFactory.panel(panel).withComment(myComment).createPanel(); } else { return panel; } }