• Home
  • Textbooks
  • Starting Out with Java: From Control Structures through Objects
  • Applets and More

Starting Out with Java: From Control Structures through Objects

Tony Gaddis

Chapter 14

Applets and More - all with Video Answers

Educators


Chapter Questions

00:41

Problem 1

How is an applet that is associated with a Web page executed on a user's system?

Ernest Castorena
Ernest Castorena
Numerade Educator
00:54

Problem 2

Why do applets run in a restricted environment?

Cody Delk
Cody Delk
Numerade Educator
01:23

Problem 3

What tag marks the beginning and end of an HTML document?

Vysakh M
Vysakh M
Numerade Educator
01:49

Problem 4

What tag marks the beginning and end of an HTML document's head section?

SS
Sarvesh Somasundaram
Numerade Educator
02:03

Problem 5

What statement would you use in an HTML document to display the text "My Web Page" in the browser's title bar? What section of the HTML document would this statement be written in?

Samriddhi Singh
Samriddhi Singh
Numerade Educator
01:23

Problem 6

What tag marks the beginning and end of an HTML. document's body section?

Vysakh M
Vysakh M
Numerade Educator
10:06

Problem 7

What statement would you write in an HTML document to display the text "Student Roster" as a level one header?

Darren Wilson
Darren Wilson
Numerade Educator
00:12

Problem 8

What statement would you write in an HTML document to display the text "My Resume" in bold and centered on the page?

Ashley High
Ashley High
Numerade Educator
01:23

Problem 9

What statement would you write in an HTML document to display the text "Hello World" in bold and italic?

Vysakh M
Vysakh M
Numerade Educator
01:29

Problem 10

What tag causes a line break? What tag causes a paragraph break? What tag displays a horizontal rule?

Sheryl Ezze
Sheryl Ezze
Numerade Educator
03:40

Problem 11

Suppose you wanted to display the text "Click Here" as a link to the Web site http:// java.sun.com. What statement would you write to create the text?

Harriet O'Brien
Harriet O'Brien
Numerade Educator
00:49

Problem 12

Instead of JPrame, an applet class is extended from what class?

Aditya Sood
Aditya Sood
Numerade Educator
03:07

Problem 13

Instead of a constructor, an applet class uses what method?

SS
Sarvesh Somasundaram
Numerade Educator
00:41

Problem 14

Why is there no need for a static main method to create an instance of an applet class?

Ernest Castorena
Ernest Castorena
Numerade Educator
00:30

Problem 15

Suppose the file MyApplet.jawa contains the Java source code for an applet. What tag would you write in an HTML document to run the applet in an area that is 400 pixels wide by 200 pixels high?

Ashley Jordon
Ashley Jordon
Numerade Educator
03:07

Problem 16

To create an applet using AWT, what class do you inherit your applet class from?

SS
Sarvesh Somasundaram
Numerade Educator
02:10

Problem 17

In Swing, if an object's class extends JFrane or JApplet, you add components to its content pane. How do you add components to an object if its class extends Frane or Applet?

SS
Sarvesh Somasundaram
Numerade Educator
00:51

Problem 18

In an $A W T$ component, or a class that extends JApplet or JPrame, if you want to get a reference to the Graphica object, do you override the paint or paintcomponent method?

Manik Pulyani
Manik Pulyani
Numerade Educator
03:28

Problem 19

In a Jrane1 object, do you override the paint or paintcomponent method to get a reference to the Graphics object?

Anna Jones
Anna Jones
Numerade Educator
02:53

Problem 20

When are the paint and paintcomponent method called?

Aaron Goree
Aaron Goree
Numerade Educator
19:31

Problem 21

In the paint or paintComponent method, what should be done before anything else?

Brian Ketelobeter
Brian Ketelobeter
Numerade Educator
03:28

Problem 22

How do you force the paint or paintcomponent method to be called?

Anna Jones
Anna Jones
Numerade Educator
01:36

Problem 23

When using a Graphics object to draw an oval, what invisible shape is the oval enclosed in?

Jayashree Behera
Jayashree Behera
Numerade Educator
00:34

Problem 24

What values are contained in the two arrays that are passed to a Graphlcs object's drawRolygon method?

Aditya Sood
Aditya Sood
Numerade Educator
01:54

Problem 25

What Graphics class methods do you use to perform the following tasks?
a) draw a line
b) draw a filled rectangle
c) draw a filled oval
d) draw a filled arc
c) set the drawing color
$f$, draw a rectangle
g) draw an oval
h) draw an arc
i) draw a string
i) set the font

Prabhakar Kumar
Prabhakar Kumar
Numerade Educator
01:44

Problem 26

What is the difference between a mouse press event and a mouse click event?

Richard Miller
Richard Miller
Numerade Educator
02:10

Problem 27

What interface would a listener class implement to handle a mouse click event? $A$ mouse press event? A mouse dragged event? A mouse release event? A mouse move event?

SS
Sarvesh Somasundaram
Numerade Educator
01:10

Problem 28

What type of object do mouse listener and mouse motion listener methods accept? What methods do these types of objects provide for determining a mouse cursor's location?

Maya Mysore
Maya Mysore
Numerade Educator
01:29

Problem 29

If a class implements the Mousetiatener interface but does not need to use all of the methods specified by the interface, can the definitions for those methods be left out? If not, how are these methods dealt with?

Aditya Sood
Aditya Sood
Numerade Educator
01:05

Problem 30

What is an adapter class, and how does it make some programming tasks easier?

Aditya Sood
Aditya Sood
Numerade Educator
00:32

Problem 31

What type of events do Timer objects generate?

Amy Jiang
Amy Jiang
Numerade Educator
01:34

Problem 32

How are the time intervals between a rimer object's action events measured?

Sri Datta Vikas Buchemmavari
Sri Datta Vikas Buchemmavari
Numerade Educator
02:21

Problem 33

How do you cause a timer object to begin generating action events?

Darren Wilson
Darren Wilson
Numerade Educator
02:21

Problem 34

How to you cause a timer object to cease generating action events?

Darren Wilson
Darren Wilson
Numerade Educator
02:42

Problem 35

What Applet method can you use to play a sound file?

Stacy Storey
Stacy Storey
Numerade Educator
03:45

Problem 36

What is the difference between using the Applet method asked for in Checkpoint $14.35,$ and using an Audioclip object to play a sound file?

Foster Wisusik
Foster Wisusik
Numerade Educator
00:13

Problem 37

What methods does an Audioclip object have? What do they do?

Sam Limsuwannarot
Sam Limsuwannarot
Numerade Educator
01:08

Problem 38

What is the difference between the Applet class's getDocumentBase and getcodeBase methods?

Florencia Cuzmar
Florencia Cuzmar
Numerade Educator