hasCustomComponents = false; Container msg = createMessageArea(); if (msg != null) { ((JComponent) msg).setBorder(messageBorder); msg.setForeground(messageForeground); messageAreaContainer = msg; optionPane.add(msg); }
optionPane.add(createMessageArea());
  protected void installComponents()  {    // reset it.    hasCustomComponents = false;    Container msg = createMessageArea();    if (msg != null)      {	((JComponent) msg).setBorder(messageBorder);	msg.setForeground(messageForeground);	messageAreaContainer = msg;	optionPane.add(msg);      }    // FIXME: Figure out if the separator should be inserted here or what    // this thing is supposed to do. Note: The JDK does NOT insert another    // component at this place. The JOptionPane only has two panels in it    // and there actually are applications that depend on this beeing so.    Container sep = createSeparator();    if (sep != null)      optionPane.add(sep);    Container button = createButtonArea();    if (button != null)      {	((JComponent) button).setBorder(buttonBorder);	buttonContainer = button;	optionPane.add(button);      }    optionPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 11, 11));    optionPane.invalidate();  }