Professional Documents
Culture Documents
6
7
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Computer Engineering De
Course: Advanced Java Programming Code: 22517
Unit I : Introduction to AW
Question
Which abstract class is the super class of all menu related classes ?
Which class can be used to represent a checkbox with a textual lable that can
appear in a menu?
Which of these classes can be added to any Container class,using the add
method defined in container class?
Package of drawstring() method is
JIT meaning
Which of the following applet class displays the result of the applet code on
the screen ?
What is jdb?
If a program consists of three classes then after compilation how many class
file are created by compiler?
Arguments passed via command line are stored as _____ data type
A GUI______
Which of the following is used to interpret and execute Java Applet Claases
hosted by HTML?
Which of the following statements is for placing the frame's upper left corner
to (200,100)
Suppose a Jframe uses the GridLayout(2,0). If you add the six buttons to the
frame, how many columns are displayed?
Can you use the setBackground method to set a back ground color
for_________?
The method _______ gets the the text (or caption) of the jlbl.
The method ________ gets the contents of the text field jtf
pacakage contains all the classes and methods required for event handling in
java
method can be used to obtain the command name for invoking ActionEvent
object
method can be used to know the degree of adjustment made by the user
If scroll bar is manipulated -------- event will be notified
which of these constant value will change when the button at the end of scroll bar was
clicked toincrease its value?
When the size of component is changed ,-------event is generated?
When the component is added or removed ? Which of these event is generated ?
method can be used to obtain the reference to the container that generated a
ConatainerEvent
Which of the following methods can be used get reference to a component that was
affected by the container?
Which of the following method can be used to obtain the coordinate of mouse?
when a componenet is added to a container which of these interfaces handels the event?
interface define a method actionPerformed()
which of the following intertface define four methods?
interface define a method itemStateChanged()
which method from the following methods will respond when you click any button by
mouse?
methods will be invoked if a character is entered
which of the constant from the following constants is defined in WindowEvent class?
is a superclass of all adapter classes
In java,events are all theactivities that occur between:
EventObject class belong to:
The component class is an abstract class and so its ------------ are used to create
components
The AWT classes can be roughly categorized into the following groups:
Window is is used for ------------------ windows.
The ------------ interface is used to handle the menu events
An event is generated when the internal state of the event source is ---------
Eventobject class belongs to;
The --------interface handles list events
The ---------interface is used to handel the menu events
Which of the following components generate action events ?
The event delegation model ,introduced in release 1.1 of the JDK , is fully compatible
with the event model
neering Department
Course Faculty: I. J. Patel
oduction to AWT
Option A Option-B Option-C Option-D
CheckboxMe
MenuComponent MenuBar MenuItem nuItem
CheckBoxMenuIta
MenuBar m Menu Menubar
CheckBoxMenuIta
Button m Menu Menubar
java.applet java.io javax.swing java.awt
destroy()met
start()method init()method stop()method hod
java. unit
java.io Package java.lang packege java.awt package pakage
java. unit
java.io Package java.lang packege java.awt package pakage
1 2 5 Many
none of
Java In Time Just In Time Join In time above
none of
Applet Engine Virtual machine JVM above
32 39 48 115
you cannot
placeAWT AWT stands for The AWT
Swing exists since components on Abstract classes are
version 1.2. of jdk swing containers Window Toolkit deprecated
java
Java disassembler java interpreter java compiler debugger
All of the
Class Methods Interfaces Above
yes No
java
java debugger java intrepreter java compiler disassemable
yes no
it gives access to other to create single none of the
methods it is in syntax copy above
TRUE FALSE
Any of the
final static abstract above
yes no
Helper classes
user interface Layout
Container classes such as Color
classes managers
and Font
frame.setLocation(100, frame.setLoc
frame.setLocation frame.setLocatio
100) ation(200,20
(100,200) n(200,100)
0)
1 2 3 4
Association
Aggregation Composition Inhertitance
JPanel
Jbutton Jframe Jcomponent
p.getContentPane
p.add(c) p.insert(c) p.append(c)
l(c)
setForegroun
setForeground(Color.Ye f.setForeground(C f.setForeground(
d(Color.Yello
llow) olor.yellow) Color.yellow)
w)
Jpanel p=new Jpanel p=new Jpanel
Jpanel p=new Jpnel() Jpanel(Border Jpanel(new p=new
Layout)); BorderLayout)); Jpanel().setL
flowlayout Gridlayout Borderlayout None
newColor(30
new Colour(0,0,0) newColor(10,0,0) newColor(20,0,0)
,0,0)
jchk.getSelected() jchk.selected() jchk.isSelected() jchk.select()
jlbl.retrieveT
jlbl.Text() jlbl.getText() jlbl.findText()
ext()
jlbl.newText("Res
jlbl.setText("Result") jlbl.Text() jlbl.findText()
ult")
jtf.getText(s) jtf.get.Text() jtf.getString() jtf.getString()
getActionEvent
getCommand() getActionCommand() getActionEvent() Command()
All of the
ALT_MASK CTRL-MASK SHIFT-MASK mentioned
ActionEvent AdjustmentEvent KeyEvent WindowEvent
getAdjustmentType( getEventObject
getType() getEventType() ) Type()
getAdjustmentValue getAdjustment
getValue() getAdjustmentType() () Amount()
ActionEvent ComponentEvent AdjustmentEvent WindowEvent
BLOCK_INCREME UNIT_DECREME UNIT_INCRE
BLOCK_DECREMENT NT NT MENT
ComponentEvent ContainerEvent FocusEvent InputEvent
ComponentEvent ContainerEvent FocusEvent InputEvent
getContainerComma getConatainerE
getContainer() nd() getActionEvent() vent()
getContainerCompo getcComponent
getComponent() getChild() nent() Child()
COMPONENT_MO COMPONENT_RE All of the
COMPONENT-HIDDEN VED SIZE mentioned
ComponentEvent ContainerEvent FocusEvent InputEvent
ComponentEvent ContainerEvent ItemEvent InputEvent
typeFocus() typeEventFocus() isTemporary() isPermanent()
WindowEvent() ComponentEvent ItemEvent InputEvent
getMouseCoor
getPoint() getCoordinates() getMouseXY() dinates()
ChangeCoordinates( TranslateCordi
ChangePoint() TranslatPoint() ) nates()
TEXT_FORMAT_C TEXT_VALUE_CH TEXT_SIZE_C
TEXT_CHANGED HANGED ANGED HANGED
getWindowObj
getMethod() getWindow() getWindowEvent() ect()
ComponentEvent ContainerEvent ItemEvent InputEvent
getX() getXCoordinates() getCoordinateX() getPointX()
WINDOW_DEIICO All of the
WINDOW_ACTIVATED WINDOW_CLOSED NFIED mentioned
WindowEvent() ComponentEvent ItemEvent InputEvent
java.lang java.awt java.awt.event java.event
TRUE FALSE
ntObject()
mentEvent
of the above
wLisenter
wListener