Exam 14: Applets and More

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

A mouse motion listener class can respond to:

Free
(Multiple Choice)
4.8/5
(44)
Correct Answer:
Verified

C

An applet using a Swing GUI is extended from this class.

Free
(Multiple Choice)
4.8/5
(31)
Correct Answer:
Verified

D

What does the tag <p /> cause to happen?

Free
(Multiple Choice)
5.0/5
(34)
Correct Answer:
Verified

B

HTML describes the content and layout of a Web page, and creates links to other files and Web pages, but does not have sophisticated abilities such as performing math calculations and interacting with the user.

(True/False)
4.8/5
(45)

Which of the following sound file formats does Java not support?

(Multiple Choice)
4.9/5
(35)

Which of the following will load the applet, TestApplet?

(Multiple Choice)
4.9/5
(31)

In the following code that uses a Swing GUI, which line has an error? 1 public class TestApplet extends Applet 2 { 3 public void init() 4 { 5 JLabel label = new JLabel("Test label"); 6 setLayout(new FlowLayout()); 7 add(label); 8 } 9 }

(Multiple Choice)
4.7/5
(35)

When someone visits a Web page containing a Java applet:

(Multiple Choice)
4.8/5
(33)

These are Java programs that are usually part of a Web site.

(Multiple Choice)
4.8/5
(39)

If a frame component is 300 pixels wide and 200 pixels high, the upper, right-hand corner has (X, Y) coordinates of:

(Multiple Choice)
4.8/5
(44)

What will happen if you use instead of in an HTML document?

(Multiple Choice)
4.9/5
(30)

Look at the following applet code: 1 import javax.swing.*; 2 import java.awt.*; 3 public class GraphicsTest extends JApplet 4 { 5 public void init() 6 { 7 getContentPane().setBackground(Color.WHITE); 8 } 9 public void paint(Graphics g) 10 { 11 int[] xCoords = {20, 20, 60, 100, 140, 140, 100, 60}; 12 int[] ycoords = {20, 100, 140, 140, 100, 60, 20, 20}; 13 super.paint(g); 14 g.setColor(Color.YELLOW); 15 g.fillPolygon(xCoords, yCoords, 8); 16 g.setColor(color.BLACK); 17 g.setFont(new Font("SansSerif", Font.BOLD, 35)); 18 g.drawString("SLOW", 35, 95); 19 } 20 } How many vertices does the polygon have?

(Multiple Choice)
4.8/5
(38)

One way of viewing the results of the applet which is invoked in the HTML document TestApplet.html is to enter the following at the command prompt.

(Multiple Choice)
4.9/5
(39)

An applet does not have to be on a Web server in order to be executed.

(True/False)
4.8/5
(37)

Some browsers do not directly support the Swing classes of applets.

(True/False)
4.8/5
(41)

The ________ object is responsible for drawing the entire applet window.

(Multiple Choice)
4.7/5
(36)

What does the HTML tag <hr /> cause to happen?

(Multiple Choice)
4.8/5
(43)

Hypertext can contain:

(Multiple Choice)
4.8/5
(37)

Applet restrictions are:

(Multiple Choice)
4.8/5
(43)

Look at the following applet code: 1 import javax.swing.*; 2 import java.awt.*; 3 public class GraphicsTest extends JApplet 4 { 5 public void init() 6 { 7 getContentPane().setBackground(Color.WHITE); 8 } 9 public void paint(Graphics g) 10 { 11 int[] xCoords = {20, 20, 60, 100, 140, 140, 100, 60}; 12 int[] ycoords = {20, 100, 140, 140, 100, 60, 20, 20}; 13 super.paint(g); 14 g.setColor(Color.YELLOW); 15 g.fillPolygon(xCoords, yCoords, 8); 16 g.setColor(color.BLACK); 17 g.setFont(new Font("SansSerif", Font.BOLD, 35)); 18 g.drawString("SLOW", 35, 95); 19 } 20 } What is the color of the polygon?

(Multiple Choice)
4.8/5
(30)
Showing 1 - 20 of 54
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)