JComponent () { JPanel panel = createIconPanel(); if (myMessage != null) { JTextPane messageComponent = createMessageComponent(myMessage); panel.add(Messages.wrapToScrollPaneIfNeeded(messageComponent, 100, 15), BorderLayout.CENTER); } return panel; }