Exam Sutra Advance Java Chapter 2
Exam Sutra Advance Java Chapter 2
121. Pluggable look and feel and lightweight components are the features
supported by ________
a. Swing
b. AWT
c. Core java
d. None of these
a. Client server
b. Model view controller
c. layered
d. None of these
123. Swing is not a part of JFC that is used to create GUI application.
a. True
b. False
124. The java foundation classes ( JFC ) is a set of GUI components which
simplify the development of desktop applications.
a. True
b. False
125. Following letter used a prefix to swing component.
a. A
b. S
c. G
d. J
126. _____ is one of the features of object oriented programming that allows the
creation of hierarchical classifications.
a. Polymorphism
b. Class
c. Inheritance
d. Object
a. AbstractButton
b. JToggleButton
c. JComponent
d. None of these
a. JComboBox
b. JTextArea
c. JSlider
d. All of the above
129. In swing class hierarchy the class present at the root is ___
a. Component
b. Window
c. Container
d. Object
a. Glsass
b. Content
c. Container
d. All of the above
a. Setimg
b. setIcon
c. serLabelIcon
d. none of this
a. JList
b. JComboBox
c. JLabel
d. All of the above
a. JButton
b. JCheckBox
c. JRadioButton
d. Both b & c
134. The swing component classes that are used in encapusulates a mutually
exclusive set of buttons?
a. Abstractbutton
b. ButtonGroup
c. JButton
d. ImageIcon
135. Which method of the component class is used to set the position and size
of a component?
a. setPosition
b. setBounds
c. setSize
d. none of these
1. canvas is a component
2. scrollpane is a container
a. True
b. False
a. Button
b. Textfield
c. Label
d. List
a. Flowlayout
b. Gridlayout
c. Border layout
d. Gridbag layout
a. True
b. False
a. Model
b. View
c. Controller
d. None of these
a. Model
b. View
c. Controller
d. None of these
146. _____ represents enterprise data and the business rules that gives access to
enterprise data.
a. Model
b. View
c. Controller
d. None of these
a. Display()
b. Paint()
c. displayApplet()
d. PrintApplet()
a. Content pane
b. Window
c. Container
d. None of these
149. Which of the following component is not supported by AWT but supported
in Swing ?
a. Table
b. Tabbed pane
c. Both a & b
d. None of these
150. Double-buffering built in, tool tips, dockable tool bars, keyboard
accelerators, custom cursors, etc. are new features of
Ans – Swing
151. for using Swing control one must import ___________ package.
Ans – Japplet
a. ImageInsert Class
b. ImageIcon class
c. PutImage class
d. None of these
Ans – 5 pixels
a. Table
b. JTable
c. YTable
d. All of these
Ans – Applet
a. AbstractButton
b. RadioButton
c. CheckBoxItem
d. None of these
a. Java.awt
b. Java.swing
c. Javax.swing
d. None of these
a. Java.awt
b. Java.swing
c. Javax.swing
d. None of these
a. getDisplayLanguage()
b. GetdisplayLanguage()
c. GetDisplayLanguage()
d. None
162. What are the types of Applets ?
a. Trusted
b. Untrusted
c. Both a & b
d. None of these
163. JFrame myFrame = new JFrame (); Any command (such as the one listed
above) which creates a new object of a specific class (in this case a new JFrame
object called myFrame) is generally called a ..
a. Constructor
b. Layout Manager
c. Parameter
d. GUI
a. Java.util package
b. Java.lang package
c. Java.io package
d. Java.awt package
165. Suppose you are developing a Java Swing application and want to toggle
between various views of the design area. Which of the views given below are
present for the users to toggle?
a. Requirements View
b. Design View
c. Source View
d. Management View
166. What is the name of the Swing class that is used for frames?
a. SwingFrame
b. Frame
c. Window
d. None of these
167. What is the name of the Swing class that is used for frames?
a. SwingFrame
b. Frame
c. Window
d. JFrame
Ans – Swing
Ans – Jcomponent
a. Light weight
b. Platform independent
c. Both a & b
d. None of these
171. In _________ each component renders itself using the drawing primitives
of the Graphics object.
a. AWT
b. Swing
c. Both a & b
d. None of these
a. JCheckBox
b. JToggleButton
c. Both a & b
d. None of these
a. 3
b. 1
c. 2
d. 4
a) ButtonGroup
b) ButtonSets
c) Both a & b
d) None of these
180. When layout manager is disabled , which method is used to determine the
shape and position of Component?
a) SetBounds
b) SetSize
c) SetCoordinates
d) None of these
181. which package we need to import while writng swing JRadioButton class
a) RadionButton
b) Checkbox
c) CheckboxGoup
d) All of these
a) JLabel
b) JButton
c) JCheckBox
d) All of these
184. Which component displays information in hierarchical manner with parent-
child relationship?
a) JFrame
b) JTree
c) JComboBox
d) JTable
a) JFrame
b) JTree
c) JComboBox
d) JTable
a) Label , TextField
b) Label , Checkbox
c) Both a & b
d) None of these
Ans – JcomboBox
188. Which is default layout Manager for Japplet?
a) FlowLayout
b) BorderLayout
c) GridLayout
d) CardLayout
a) addTab
b) insertTab
c) putTab
d) none of these
a) setDefaultCloseOperation()
b) setCloseOperation()
c) closeFrame()
d) none of these
a) JTree
b) JComboBox
c) iframe
d) JTable
a) JMenuBar
b) Canvas
c) JCheckBox
d) JTree
193. Which of the following is not true about swing components ?
a) JToggleButton
b) JCheckBox
c) JAbstractButton
d) JRadioButton
a) DefaultMutableTreeNode
b) AddTreeNode
c) InsertTreeNode
d) All of these
Ans – columnheader
197. Which one of the following is the correct constructor for progressbar ?
a) JProgressBar()
b) JProgressBar(int min , int max)
c) Both a & b
d) None of these
198. How to create a progress bar with minimum and maximum value ?
Ans – Boolean
201. Which method is used to set the value of the progress bar ?
202. In progress bar which method is useful in displaying the data after periodic
interval ?
Ans – Thread.sleep(1000);
204. In MVC which component manages the state and conducts all
transformations on that state ?
a) Model
b) View
c) Controller
d) None of these
205. In MVC which component manages the visual display of the state
represented by the model ?
a) Model
b) View
c) Controller
d) None of these
206. In MVC which component managing the user interaction with the model ?
a) Model
b) View
c) Controller
d) None of these