Beruflich Dokumente
Kultur Dokumente
Chapter 19
Section 19.1
Section 19.2
19.2 Q2: Method __________ of class Applet returns the location of the HTML file on the Internet as an object of
class URL.
a.getDocumentBase.
b.getBaseDocument.
c.getDocumentLocation.
d.getDocumentURL.
ANS: a. getDocumentBase.
19.2 Q3: Which package is class Image in? Which package is class ImageIcon in?
a.javax.swing, javax.swing.
b.java.awt, javax.swing.
c.javax.swing, java.awt.
d.java.awt, java.awt.
ANS: b. java.awt, javax.swing.
19.2 Q4: Class Image objects are displayed using which Graphics method?
a.drawImage.
b.paintImage.
c.getImage.
d.setImage.
ANS: a. drawImage.
Section 19.3
19.3 Q1: An object of class __________ generates ActionEvents at a fixed interval in milliseconds and notifies
all of its registered ActionListeners that the event occurred.
a.Timer.
b.Clock.
© Copyright 2003 by Deitel & Associates, Inc. and Prentice Hall. All Rights Reserved.
Java How to Program, 5/e Test Item File 2 of 2
c.AlarmClock.
d.Interrupter.
ANS: a. Timer.
19.3 Q2: The first statement in any JComponent paintComponent method should be a call to the
a.Superclass's paint method.
b.Subclass’s paintComponent method.
c.Subclass’s paint method.
d.Superclass's paintComponent method.
ANS: d. Superclass's paintComponent method.
19.3 Q3: Stopping animation when the user switches Web pages helps to make the applet
a.robust.
b.safe.
c.browser friendly.
d.efficient.
ANS: c. browser friendly.
Section 19.4
19.4 Q1: An image map is an image that has __________ that the user can click to accomplish a task.
a.Buttons.
b.Toggles.
c.Hot areas.
d.Bubbles.
ANS: c. Hot areas.
Section 19.5
19.5 Q3: This method returns the location of the applet’s .class file.
a.getDocumentBase.
b.getCodeBase.
c.getClassLocation.
d.getLocation.
ANS: b. getCodeBase.
© Copyright 2003 by Deitel & Associates, Inc. and Prentice Hall. All Rights Reserved.