MessageBox Class

MessageBox Class

This Package | All Packages

public class MessageBox

Allows you to display a message box with various buttons and icons.

Fields
Name Description
ABORTRETRYIGNORE Topic under construction.
DEFBUTTON1 Topic under construction.
DEFBUTTON2 Topic under construction.
DEFBUTTON3 Topic under construction.
ICONASTERISK Topic under construction.
ICONERROR Topic under construction.
ICONEXCLAMATION Topic under construction.
ICONHAND Topic under construction.
ICONINFORMATION Topic under construction.
ICONQUESTION Topic under construction.
ICONSTOP Topic under construction.
ICONWARNING Topic under construction.
IDABORT Topic under construction.
IDCANCEL Topic under construction.
IDIGNORE Topic under construction.
IDNO Topic under construction.
IDOK Topic under construction.
IDRETRY Topic under construction.
IDYES Topic under construction.
OK Topic under construction.
OKCANCEL Topic under construction.
RETRYCANCEL Topic under construction.
YESNO Topic under construction.
YESNOCANCEL Topic under construction.

Methods
Name Description
show(String text, String caption, int style) Shows the message box with the given text, caption, and style.
show(String text, String caption) Shows the message box with the given text and caption.
show(String text) Shows the message box with the given text.

Fields

MessageBox.ABORTRETRYIGNORE

Syntax
public static final int ABORTRETRYIGNORE;
Description
Topic under construction.

MessageBox.DEFBUTTON1

Syntax
public static final int DEFBUTTON1;
Description
Topic under construction.

MessageBox.DEFBUTTON2

Syntax
public static final int DEFBUTTON2;
Description
Topic under construction.

MessageBox.DEFBUTTON3

Syntax
public static final int DEFBUTTON3;
Description
Topic under construction.

MessageBox.ICONASTERISK

Syntax
public static final int ICONASTERISK;
Description
Topic under construction.

MessageBox.ICONERROR

Syntax
public static final int ICONERROR;
Description
Topic under construction.

MessageBox.ICONEXCLAMATION

Syntax
public static final int ICONEXCLAMATION;
Description
Topic under construction.

MessageBox.ICONHAND

Syntax
public static final int ICONHAND;
Description
Topic under construction.

MessageBox.ICONINFORMATION

Syntax
public static final int ICONINFORMATION;
Description
Topic under construction.

MessageBox.ICONQUESTION

Syntax
public static final int ICONQUESTION;
Description
Topic under construction.

MessageBox.ICONSTOP

Syntax
public static final int ICONSTOP;
Description
Topic under construction.

MessageBox.ICONWARNING

Syntax
public static final int ICONWARNING;
Description
Topic under construction.

MessageBox.IDABORT

Syntax
public static final int IDABORT;
Description
Topic under construction.

MessageBox.IDCANCEL

Syntax
public static final int IDCANCEL;
Description
Topic under construction.

MessageBox.IDIGNORE

Syntax
public static final int IDIGNORE;
Description
Topic under construction.

MessageBox.IDNO

Syntax
public static final int IDNO;
Description
Topic under construction.

MessageBox.IDOK

Syntax
public static final int IDOK;
Description
Topic under construction.

MessageBox.IDRETRY

Syntax
public static final int IDRETRY;
Description
Topic under construction.

MessageBox.IDYES

Syntax
public static final int IDYES;
Description
Topic under construction.

MessageBox.OK

Syntax
public static final int OK;
Description
Topic under construction.

MessageBox.OKCANCEL

Syntax
public static final int OKCANCEL;
Description
Topic under construction.

MessageBox.RETRYCANCEL

Syntax
public static final int RETRYCANCEL;
Description
Topic under construction.

MessageBox.YESNO

Syntax
public static final int YESNO;
Description
Topic under construction.

MessageBox.YESNOCANCEL

Syntax
public static final int YESNOCANCEL;
Description
Topic under construction.

Methods

MessageBox.show

Syntax 1
public static int show( String text, String caption, int style );
Parameters
text
The text to show in the body of the message box.
caption
The title of the message box.
style
Controls the appearance of the message box. Specify a bitwise combination of the various values in the MessageBox class.
Return Value

Returns an integer with the value the user selected. For example, if the message box has a Yes/No/Cancel style, this method returns MessageBox.IDYES, MessageBox.IDNO, or MessageBox.IDCANCEL.

Description

Shows the message box with the given text, caption, and style.



Syntax 2
public static int show( String text, String caption );
Parameters
text
The text to show in the body of the message box.
caption
The title of the message box.
Return Value

Returns MessageBox.IDOK.

Description

Shows the message box with the given text and caption. The message box has the default style (OK button only).



Syntax 3
public static int show( String text );
Parameters
text
The text to show in the body of the message box.
Return Value

Returns MessageBox.IDOK.

Description

Shows the message box with the given text. The message box has the default style (OK button only) and no title.