You are on page 1of 5

Top of Form

Question Bank For AJP CT –I

Q. 1 Give the abbreviation of AWT ?


(a) Applet Windowing Toolkit
(b) Abstract Windowing Toolkit
(c) Absolute Windowing Toolkit
(d) None of the above
Q. 2 Which object can be constructed to show any number of choices in the
visible window?
(a) Labels
(b) Choice
(c) List
(d) Checkbox
Q. 3 Which is the container that doesn't contain title bar and MenuBars. It can
have other components like button, Textfield etc?
(a) Window
(b) Frame
(c) Panel
(d) Container
Q. 4 Which of the following style is not supported by Font class? .
a) Font.UNDERLINE
b) Font.ITALIC
c) Font.PLAIN
d) Font.BOLD
Q. 5 What is API?
(a) Application Programming Interchange
(b) Application Programming Interaction
(c) Application Programming Interface
(d) None of these
Q. 6 What is default layout for Dialog?
(a) FlowLayout
(b) GridLayout
(c) CardLayout
(d) BorderLayout
Q 7 What is the return type of getText( ) method of JButton class?
a) void
b) String
c) Character array
d) There is no such method
Q. 8 Which class is used to represent a single line textbox with password
character facility?
(a) TextField
(b) TextArea
(c) Label
(d) Checkbox
Q. 9 When there is a switching condition like ON or OFF, which control is used
of following?
(a) Button
(b) RadioButton
(c) ToggleButton
(d) TextField
Q 10 ____ creates a dropdown list of textual entries
a. Choice
b. Checkbox
c. Textbox
d. TextComponent
Q. 11 Which package is used for import the swing components?
(a) java.swing
(b) java.awt
(c) javax.swing
(d) All of the above
Q. 12 In swing, Buttons are subclasses of which class?
(a) AbstractButton
(b) JButton
(c) Button
(d) JRadioButton
Q. 13 JTabbedPane class is present in which package?
(a) java.awt
(b) java.swing
(c) java.awt.swing
(d) javax.swing
Q 14 FlowLayout does not support this value of alignment…
a) FlowLayout.LEFT
b) FlowLayout.CENTER
c) FlowLayout.RIGHT
d) FlowLayout.BASELINE
Q 15 Positions the components into five regions :east, west, north, south, center
a. BorderLayout
b. CardLayout
c. GridLayout
d. FlowLayout
Q 16 To make the group of radio button______________ is used.
a) Checkbox
b) checkboxGroup
c) Button
d) Choice
Q 17 ________ class used to create node in tree.
a) JTree
b) DefaultMuableTreeNode
c) Tree
d) Root
Q 18 Which constructor creates a TextArea with 10 rows and 20 columns ?
a) TextArea(20,10);
b) TextField(10,20);
c) TextArea(10,20);
d) TextField(20,10);
Q 19 Default layout manager for Window is
a) BorderLayout
b) GridLayout
c) FlowLayout
d) CardLayout
Q 20 The _____________ class is used to create radio button in AWT
a) JRadioButton
b) Choice
c) CheckBox
d) Checkbox
Q 21 __________ method is used to add the menubar on frame window.
a) add();
b) setMenubar();
c) addMenubar();
d) setMenuBar();
Q 22 Which of the following is the constructor of JLabel.
a) JLabel();
b) JLabel(String str);
c) JLabel(String str, Image);
d) All the above
Q 23 __________ arranges the component in rows and column.
a) FlowLayout
b) BorderLayout
c) CardLayout
d) GridLayout
Q 24 The default orientation of JProgressBar is ______________
a) Horizontal
b) Vertical
Q 25. Which of the following classes in Java contains swing version of an
applet?
a JButton
b JCheckBox
c JApplet
d JLabel

Q. 26 Which of the following method is used to determine the type of


adjustment event?
(a) getType( )
(b) getEventType( )
(c) getAdjustmentType( )
(d) getEventObjectType( )

Q. 27 Which event is generated when the position of scrollbar is changed?


(a) KeyEvent
(b) MouseEvent
(c) ItemEvent
(d) AdjustmentEvent

Q. 28 Name the method defined in EventObject class that returns the object
generated from the event.
(a) getEvent( )
(b) getObject( )
(c) getId( )
(d) getSource( )

Q. 29 The _________ is an object that is notified when an event occurs.


(a) Listener
(b) Sources
(c) Event
(d) None of the above

You might also like