com.jthomas.mailfaces
Class MsgDialog

java.lang.Object
  |
  +--com.jthomas.mailfaces.MsgDialog

public class MsgDialog
extends java.lang.Object

Display an informational message via a Dialog box along with an OK button that will clear the Dialog from the screen. It uses the MailFaces Prompter class to actually display the Dialog and process the OK or Cancel action.

   Example:
      okpressed = MsgDialog.create("MultiLine Msg\n" +
                                   "Press OK to retry");
      if (okpressed)
            retry();
      else
            return;
   


Method Summary
static boolean create(java.awt.Frame frame, java.lang.String message, boolean modal)
          Create and display a modal dialog box with multiline msg.
static boolean create(java.lang.String message)
          Create and display a modal dialog box with multiline msg.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static boolean create(java.lang.String message)
Create and display a modal dialog box with multiline msg.

This Class method will create the Message Dialog box with a MultiLine message and an "OK" button. The message would use "\n" to separate the lines. It will return true if user presses OK button. and false if user presses cancel button.

  Example:
     boolean result = MsgDialog.create("Hello from:\n" + myname);
  

Returns:
boolean true if OK pressed, false if cancel pressed

create

public static boolean create(java.awt.Frame frame,
                             java.lang.String message,
                             boolean modal)
Create and display a modal dialog box with multiline msg.

This Class method will create the Message Dialog box with a MultiLine message and an "OK" button and associate it with the specified frame. The Dialog can be modal or non modal. The message would use "\n" to separate the lines.

  Example:
     boolean result = MsgDialog.create(myframe,"Hello from:\n" + myname, true);
  

Returns:
boolean true if OK pressed, false if cancel pressed