Exam 14: Applets and More

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

Which of the following is NOT a restriction placed on applets?

(Multiple Choice)
4.9/5
(34)

In an applet, events are handled:

(Multiple Choice)
4.7/5
(36)

Which tag will produce largest text?

(Multiple Choice)
4.9/5
(39)

The browser creates an instance of the applet class automatically.

(True/False)
4.9/5
(45)

The delay parameter in the Timer constructor is the amount of time between action events, measured in microseconds.

(True/False)
4.9/5
(39)

If an applet attempts to violate one of the JVM restrictions:

(Multiple Choice)
4.8/5
(39)

The delay parameter in the Timer constructor is the amount of time between action events, measured in milliseconds.

(True/False)
4.9/5
(41)

________ is the language that Web pages are written in.

(Multiple Choice)
4.9/5
(29)

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 will be the coordinates of the third point of the polygon?

(Multiple Choice)
4.8/5
(44)

The play method will load and play a sound file once, then release it for garbage collection. The getAudioClip method will load the sound file and may assign the location of the sound file to a variable so it may be invoked many times.

(True/False)
4.9/5
(39)

In the following code, what does getDocumentBase()return? Play(getDocumentBase(), "mysound.wav");

(Multiple Choice)
4.8/5
(42)

Whenever you need a component of any type to be painted, call the paint method.

(True/False)
4.8/5
(35)

When the applet viewer opens an HTML document with more than one applet tag:

(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 super.paint(g); 12 g.setColor(Color.YELLOW); 13 g.fillOval(100, 100, 50, 50); 14 g.setColor(Color.BLACK); 15 g.setFont(new Font("SansSerif", Font.BOLD, 35)); 16 g.drawString("SLOW", 110, 110); 17 } 18 } Which line sets the color that will be used to draw "SLOW"?

(Multiple Choice)
4.9/5
(39)

Given the following code, how many times per second will the TimerListener event be generated? Timer timer = new Timer(500, new TimerListener());

(Multiple Choice)
4.9/5
(42)

When you extend an interface, you must implement all the methods defined in the interface. If you are interested in only one or two mouse events, you can extend the ________ class which implements the MouseListener interface, but does not require you to write all the functions in the interface.

(Multiple Choice)
4.8/5
(47)

To support the Swing classes in applets, some browsers require a ________, which is software that extends or enhances another program.

(Multiple Choice)
4.8/5
(47)

Which of the following is NOT a valid AWT class?

(Multiple Choice)
4.8/5
(39)

In an HTML document, the tags:

(Multiple Choice)
5.0/5
(42)

The Applet class requires that you write a constructor to create an object of the class.

(True/False)
4.9/5
(44)
Showing 21 - 40 of 54
close modal

Filters

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