Set2question 2
Set2question 2
SANJIVANI K. B. P. POLYTECHNIC
Department of Computer Technology
KOPARGAON – 423601, DIST: AHMEDNAGAR
2023-2024
Class Test: [Unit II - Swing] Date: / /2023
Name : Set: I
Roll No :
2.Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?
a) True b) False
3.The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons?
a) AbstractButton b) ButtonGroup c) JButton d) ImageIcon
4.The Java Foundation Classes is a set of GUI components which simplify the development of desktop applications?
a) True b) False
19.In Swing, the content pane can be obtained via the method:
a) getContentPane() b) fetchContentPane() c) retrieveContent() d) accessContent()
20.In Swing, what component is used for adding hints to other Swing components to provide additional information?
A. JToolTip B. JLabel C. JTextField D. JTabbedPane
22.In the MVC architecture, what role does the "View" play?
A. Manages application data.
B. Represents the user interface and presentation logic.
C. Handles user input and interactions.
D. None of the above.
24.Which Swing layout manager arranges components in a Square, with a specified number of rows and columns?
A. FlowLayout B. BorderLayout C. GridLayout D. CardLayout
28.Swing is a set of classes that provides more _____ and _____components than are possible with the AWT
a) Powerful , Flexible b) Great, Awesome c) Better , Powerful d) Stable, customizable
41.How will you assign the string and icon both to the JButton?
a) It is not possible
b) Use the setTextIcon( ) method
c) Use the setIconText( ) method
d) Initialize them directly in the constructor
42.Which event is generated when a JButton is pushed?
a) ItemEvent b) TextEvent c) PushEvent d) ActionEvent
46.What will be the correct statement if you want a checkbox to be checked by default?
a) JCheckBox jc= new JCheckBox(String s, boolean checked)
b) JCheckBox jc= new JCheckBox(String s, boolean false)
c) JCheckBox jc= new JCheckBox(String s, boolean unchecked)
d) JCheckBox jc= new JCheckBox(String s, boolean true)