this.message = message; if (! validMessageType(messageType)) throw new IllegalArgumentException("Message Type not legal value."); this.messageType = messageType; if (! validOptionType(optionType)) throw new IllegalArgumentException("Option Type not legal value."); this.optionType = optionType; this.icon = icon; this.options = options; this.initialValue = initialValue;  setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));  updateUI(); invalidate(); repaint();
this("JOptionPane message", PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null);
  public JOptionPane(Object message, int messageType, int optionType,                     Icon icon, Object[] options, Object initialValue)  {    this.message = message;    if (! validMessageType(messageType))      throw new IllegalArgumentException("Message Type not legal value.");    this.messageType = messageType;    if (! validOptionType(optionType))      throw new IllegalArgumentException("Option Type not legal value.");    this.optionType = optionType;    this.icon = icon;    this.options = options;    this.initialValue = initialValue;    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));    updateUI();    invalidate();    repaint();  }