JOptionPane

Methods
4
Fields
7

Getting one

JOptionPane

Methods

MethodReturnsDescription
showConfirmDialog(parent: any, message: any, title: string?, optionType: number?, messageType: number?, icon: any?)numberThe answer (YES_OPTION, NO_OPTION, CANCEL_OPTION, OK_OPTION) or CLOSED_OPTION.
showMessageDialog(parent: any, message: any, title: string?, messageType: number?, icon: any?)()Returns when the dialog is dismissed.
showOptionDialog(parent: any, message: any, title: string?, optionType: number, messageType: number, icon: any?, options: { any }?, initialValue: any?)numberThe 0-based index of the option chosen, or CLOSED_OPTION.
showInputDialog(...any)anyThe text entered, or nil on cancel; with selectionValues, one of them (shown as buttons) or nil.

Fields

FieldTypeDescription
ERROR_MESSAGEnumber0.
INFORMATION_MESSAGEnumber1.
WARNING_MESSAGEnumber2.
PLAIN_MESSAGEnumber-1.
OK_CANCEL_OPTIONnumber2.
YES_NO_OPTIONnumber0.
YES_OPTIONnumber0.

Method details

showConfirmDialog

showConfirmDialog: (parent: any, message: any, title: string?, optionType: number?, messageType: number?, icon: any?) -> number

The answer (YES_OPTION, NO_OPTION, CANCEL_OPTION, OK_OPTION) or CLOSED_OPTION.

showMessageDialog

showMessageDialog: (parent: any, message: any, title: string?, messageType: number?, icon: any?) -> ()

Returns when the dialog is dismissed.

showOptionDialog

showOptionDialog: (parent: any, message: any, title: string?, optionType: number, messageType: number, icon: any?, options: { any }?, initialValue: any?) -> number

The 0-based index of the option chosen, or CLOSED_OPTION.

showInputDialog

showInputDialog: (...any) -> any

The text entered, or nil on cancel; with selectionValues, one of them (shown as buttons) or nil.