タイトル
TOPJavaSwingJOptionPane → This Page

JOptionPane@Swing コンストラクタ

概要

Java - Swing - JOptionPane のコンストラクタの説明です。

コンストラクタ

コンストラクタ/説明引数引数説明
JOptionPane()
テストメッセージを含む JOptionPane を生成
- -
JOptionPane(Object message)
UI の提供するプレーンメッセージのメッセージ型およびデフォルトのオプションを使用して、メッセージを表示するための JOptionPane を生成
message メッセージ
JOptionPane(Object message, int messageType)
指定されたメッセージ型およびデフォルトのオプションを使用して、メッセージを表示するための JOptionPane を生成
message メッセージ
messageType メッセージタイプ
JOptionPane(Object message, int messageType, int optionType)
指定されたメッセージ型およびオプションを使用して、メッセージを表示するための JOptionPane を生成
message メッセージ
messageType メッセージタイプ
optionType オプション
JOptionPane(Object message, int messageType, int optionType, Icon icon)
指定されたメッセージ型、オプション、およびアイコンを使用して、メッセージを表示するための JOptionPane を生成
message メッセージ
messageType メッセージタイプ
optionType オプション
icon アイコン
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options)
指定されたメッセージ型、アイコン、およびオプションを使用して、メッセージを表示するための JOptionPane を生成
message メッセージ
messageType メッセージタイプ
optionType オプション
icon アイコン
options 選択肢
JOptionPane(Object message, int messageType, int optionType, Icon icon, Object[] options, Object initialValue)
指定されたメッセージ型、アイコン、およびオプションを使い、初期状態で選択されているオプションを指定して、メッセージを表示するための JOptionPane を生成
message メッセージ
messageType メッセージタイプ
optionType オプション
icon アイコン
options 選択肢
initialValue 初期選択


messageTypeに指定する定数

定数定数説明表示アイコン
JOptionPane.ERROR_MESSAGE エラー アイコン
JOptionPane.INFORMATION_MESSAGE 情報 アイコン
JOptionPane.WARNING_MESSAGE 警告 アイコン
JOptionPane.QUESTION_MESSAGE 質問 アイコン
JOptionPane.PLAIN_MESSAGE 通常 アイコン


optionTypeに指定する定数

定数選択肢
JOptionPane.DEFAULT_OPTION 選択肢
JOptionPane.YES_NO_OPTION 選択肢
JOptionPane.YES_NO_CANCEL_OPTION 選択肢
JOptionPane.OK_CANCEL_OPTION 選択肢


更新履歴

2016/08/27 新規作成


TOPJavaSwingJOptionPane → This Page