Java GUI Programming – Tour III (Q and A)JOptionPane : Built-In Dialog of JAVA
JOptionPane allows to create pop-up window or dialog with predefined style.
It provides following types of Dialogs which can be used as per requirement.
① Dialog Type: MessageDialog
Method used: showMessageDialog();
It is used to inform user by displaying a message. It includes OK button only.
② Input Dialog
Method: showInputDialog();
Used to get user input using Text Field.
③ Confirm Dialog
Method: showConfirmDialog();
Used to ask a user to confirm some information with Yes/No or OK/Cancel buttons.