Sei sulla pagina 1di 9

201204100110005 301

1) a. b. c. d. 2) The various controls supported by AWT are Labels, push buttonss Checkboxes, choice, list Scroll bars, text area, text field All of these The concept of the menu bar canbe implemented by using three java classes

a. b. c. d.

MenuBar Menu MenuItem All of these

3)

The most commonly used layout managers are

a. b. c. d. e.

FlowLayout BorderLayout GridLayout CardLayout All of these

4) a. b. c. d. 5)

The constructor which the Text Event class defines. TextEvent(Object source, int event_type) textevent (Object source, int event_type) textevent (object Source, float event_type) textevent (Object source, string event_type) In Java an event is an _______which specifies the change of state in the source.

a. b. c. d.

Class Object Int String

6) a. b. c. d. e. f. 7)

The name of the event classes are ActionEvent, ComponentEvent ContainerEvent, FocusEvent ItemEvent, KeyEvent WindowListener, MouseEvent TextEvent All of these The classes and interfaces defined in AWT are contained within the ______ package.

a. b. c. d.

java.awt.* java.sql.* java.io.* java.int*

8)

Java packages such as ________________ support the Event handling mechanism.

a. b. c. d.

java.util java.awt java.awt.event All of these

9) a. b. c. d. 10) a. b. c. d. e. f. 11)

The general form to set a specific type of layout manager is void setLayout(LayoutManager lm) Void setLayout(LayoutManager lm) void setLayout(layoutManager lm) Void setLayout(Layoutmanager lm) Some of the event listener interfaces are_____________ ActionListener, ComponentListener ContainerListener, FocusListener ItemListener, KeyListener WindowListener, MouseListener TextListener All of these The AWT container is an instance of the ___________ class which holds various components and other containers

a. b. c. d.

Graphics Container Eventobj None of these

12) A checkbox is a control that consists of a

a. b. c. d.

Combination of a small box A label Combination of a large box and a label Both a & b

13) Java applets are used to create _______________ applications

a. b. c. d.

Graphical User interactive Both a & b None of these

14) In Java, events are all the activities that occur between

a. b. c. d.

The user The applications Both a & b None of these

e. 15) AWT means

a. b. c. d.

Abstract Window Toolkit Abstract Window Toollayout Abstract Withdraw Tools Abstract Window Title

16) a. b. c. d. 17)

Till now, two models have been introduced in Java for Receiving and Processing events Deleting and Processing events Receiving and Deleting events Modifying and Receving events An event is generated whe the internal state of the event source is________

a. b. c. d.

Not changed Changed Either changed or not None of these

e. 18) EventObject class belongs to:

a. b. c. d.

java.util java.awt java.lang java.sql

19) Positions the components into five regions:east, west, north, south, center

a. b. c. d.

BorderLayout CardLayout GridLayout FlowLayout

20) Arranges the components as a deck of cards such that only one component is visible at a time

a. b. c. d.

BorderLayout CardLayout GridLayout FlowLayout

e. 21) Arranges the components horizontally

a. b. c. d.

BorderLayout CardLayout GridLayout FlowLayout

22) Arranges the componemnts into grid

a. b. c. d.

BorderLayout CardLayout GridLayout FlowLayout

e. 23) __________ creates a dropdown list of textual entries

a. b. c. d.

Choice Checkbox Textbox TextComponent

24) The Component class and MenuComponent class are the ___________ which represent the GUI components.

a.

Subclasses

b. c. d.

Superclasses Both a & b None of these

25) The Component class is an abstract class and so its ____________ are used to create components.

a. b. c. d.

Subclasses Superclasses Both a & b None of these

e. 26) The AWT classes can be roughly categorized into the following groups:

a. b. c. d. e.

GUI Components Layouts Graphics Tools Event Handlers All of these

27) Panel is used for __________ components

a. b. c. d.

Grouping Managing Deleting Modifying

28) An Applet is a ________ of Panel:

a. b. c. d.

Subclass Superclass Both a & b None of these

29) Window is used for ____________ windows

a. b. c. d.

Creating Handling Modifying Both a & b

30) The subclasses of Window are

a. b. c. d.

Dialog Frame Both a & b None of these

e. 31) The CardLayout class defines the following constructors: a. CardLayout() // First Cardlayout(int hor, int ver) //second b. Cardlayout() // First CardLayout(int hour, int ver) //second c. CardLayout() // First Cardlayout(int hor, int var) //second d. CardLayout() // First Cardlayout(int hour, int ver) //second 32) A menu bar represents a. A list of menus which can be added to the top of a top-level window b. A list of menus which can be deleted to the top of a top-level window c. A list of menus which can be added to the bottom of a bottom-level window d. None of these 33) Each menu is associated with a _________ list of menu items:

a. b. c. d.

Checkbox Drop-down Choice None of these

34) The two types of menus which are given as follows:

a. b. c. d.

Pop-up menus Regular menus Both a & b None of these

35) Regular menus are placed at the __________ of the application window within a menu bar

a. b.

Top Bottom

c. d.

Top-down Botttom-up

36) The __________ interface is used to handle the menu events

a. b. c. d.

ContainerListener FocusListener ActionListener WindowListener

e. 37) The text field and text area controls create a _________________ area respectively

a. b. c. d.

Single-line text Multi-line text Both a & b None of these

e. 38) The ___________ interface handles list events:

a. b. c. d.

ContainerListener FocusListener ActionListener ItemListener

39) The ___________ interface handles choice events:

a. b. c. d.

ContainerListener ItemListener ActionListener WindowListener

40) The ___________ interface is used to handle checkbox events:

a. b. c. d.

ContainerListener ItemListener ActionListener WindowListener

41) The ___________ interface is used to handle button events:

a. b. c. d.

ContainerListener ItemListener ActionListener WindowListener

42) A push button is an active control that has a _____________ appearance

a. b. c. d.

One dimensional Two dimensional Three dimensional None of these

43) ItemListener is defined by the _____________ method:

a. b. c. d.

itemChangedState() itemStateChanged() itemChanged() itemState()

44) _____________ is a superclass of TextField and TextArea classes that is used to create single-line or multiline textfields respectively:

a. b. c. d.

TextBox CheckBox TextComponent Choice

e. 45) A label is a simple control which is used to display_____________ on the window:

a. b. c. d.

Text(non-editable) Text(editable) Both a & b None of these

46) The Delegation Event Model defines a ______________ approach to handle events:

a.

Logical

b. c. d.

Physical Both a & b None of these

47) The Delegation Event Model is based on the concept of _____________

a. b. c. d.

Source Listener Both a & b None of these

48) A source generates an event and sends it to ___________ listeners that can handle the event:

a. b. c. d.

One Two One or more None of these

49) a. b. c. d. 50)

Applet is a small program written in the Java programming language that performs: A specific task May or may not be a part of a larger program Both a & b None of these _______ generates action events when an item is double-clicked, generate action events when an item is selected or deselected.

a. b. c. d.

List Check box Menu item Text box

Potrebbero piacerti anche