CBSE Assignment for Class XII Informatics Practices -GUI Dialogs And Tables . Based on CBSE and CCE guidelines. The students should read these basic concepts to gain perfection which will help him to get more marks in CBSE examination.
GUI DIALOGS AND TABLES
1. What is dialog in Java?
Ans: A dialog is a small separate window that appears to either provide or request to / from the user.
2. Write the import statement required for using JOptionPane class.
3. What is showConfirmDialog ( ) method of JOptionPane class do ?
Ans: This method displays a dialog with several buttons and returns as int option type corresponding to the button pressed ( mostly one from Yes, No or Cancel)
4. What is showInputDialog ( ) method of JOptionPane class do ?
Ans: This method displays a dialog which is intended to receive user input, and returns a String if the input component is a text field. It displays two buttons : OK and Cancel.
5. What is the difference between a dialog created with JDialog and a dialog created with JOptionPane?
Ans: The dialog created with JDialog can be customised in any form the user wants. Also with JDialog, a window’s default cloasing behaviour is available with minimize, maximaize and close buttons.
Please refer to attached file for CBSE Class 12 Informatics Practices GUI Dialogs And Tables