CH 1
CH 1
1. AWT Means?
a) Abstract Windows Toolkit
b) Advanced Web Toolkit
c) Abstract Web Toolkit
d) Advanced Web Technology
7. Color class can create object of it using which of the following color
values?
a) RGB
b) RYB
c) CMY
d) HSB
11. How you can remove all the controls from the applet?
a) Using remove( ) method.
b) Using removeAll( ) method.
c) Using removeAllControls( ) method.
d) It is not possible to remove all controls using single method.
17. How can we copy the ‘List’s contents into ‘Choice’s contents
a) This is not possible.
b) Using copyInto( ) method of List
c) Directly assigning List object to Choice object.
d) Using copyFrom( ) method.
22. Which method is used to append the text at the end of TextArea?
a) append( )
b) add( )
c) appendAt( )
d) addAt( )
26. The correct constructor of Insets( ) which uses the values is…
a) Insets(int top, int left, int bottom, int right)
b) Insets(int bottom, int right, int top, int left)
c) Insets(int right, int top, int left, int bottom)
d) Insets(Dimesnion d1, Dimension d2)
28. The concept of the menu bar canbe implemented by using three java classes—
a. MenuBar
b. Menu
c. MenuItem
d. All of these
b. BorderLayout
c. GridLayout
d. CardLayout
e. All of these
31. In Java an event is an which specifies the change of state in the source.
a. Class
b. Object
c. Int
d. String
33. The classes and interfaces defined in AWT are contained within the
package.
a. java.awt.*
b. java.sql.*
c. java.io.*
d. java.int*
d. WindowListener, MouseListener
e. TextListener
f. All of these
37. The AWT container is an instance of the class which holds various
components and other containers
a. Graphics
b. Container
c. Eventobj
d. None of these
40. In Java, events are all the activities that occur between
a. The user
b. The applications
c. Both a & b
d. None of these
42. Positions the components into five regions:east, west, north, south, center
a. BorderLayout
b. CardLayout
c. GridLayout
d. FlowLayout
43. Arranges the components as a deck of cards such that only one component is visible
at a time
a. BorderLayout
b. CardLayout
c. GridLayout
d. FlowLayout
Chapter 01 Introduction to AWT
47. The Component class and MenuComponent class are the which
represent the GUI components.
a. Subclasses
b. Superclasses
c. Both a & b
d. None of these
48. The Component class is an abstract class and so its are used to create
components.
a. Subclasses
b. Superclasses
c. Both a & b
d. None of these
49. The AWT classes can be roughly categorized into the following groups:
a. GUI Components
b. Layouts
c. Graphics Tools
d. Event Handlers
e. All of these
b. Superclass
c. Both a & b
d. None of these
d. Botttom-up
59. The interface is used to handle the menu events
a. ContainerListener
b. FocusListener
c. ActionListener
d. WindowListener
60. The text field and text area controls create a area respectively
a. Single-line text
b. Multi-line text
c. Both a & b
d. None of these
43. Arranges the components as a deck of cards such that only one component is visible at a time
Answer: b) CardLayout
44. Arranges the components horizontally Answer: d) FlowLayout
45. Arranges the components into grid Answer: c) GridLayout
46. creates a dropdown list of textual entries Answer: a) Choice
47. The Component class and MenuComponent class are the which represent the GUI components.
Answer: a) Subclasses
48. The Component class is an abstract class and so its are used to create components. Answer: a)
Subclasses
49. The AWT classes can be roughly categorized into the following groups: Answer: e) All of these
50. Panel is used for components Answer: a) Grouping
51. An Applet is a of Panel: Answer: a) Subclass
52. Window is used for windows Answer: d) Both a & b
53. The subclasses of Window are Answer: c) Both a & b
54. The CardLayout class defines the following constructors: Answer: d) CardLayout() // First
CardLayout(int hor, int ver) //second
55. A menu bar represents Answer: a) A list of menus which can be added to the top of a top-level
window
56. Each menu is associated with a list of menu items: Answer: b) Drop-down
57. The two types of menus which are given as follows: Answer: c) Both a & b
58. Regular menus are placed at the of the application window within a menu bar Answer: a) Top
59. The interface is used to handle the menu events Answer: c) ActionListener
60. The text field and text area controls create a area respectively Answer: c) Both a & b
Don't share sensitive info. Chats may be reviewed and used to train our models. Learn more