Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Starting Out with Java
Quiz 14: Applets and More
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Multiple Choice
These are Java programs that are usually part of a Web site.
Question 22
Multiple Choice
A mouse motion listener class can respond to:
Question 23
Multiple Choice
If a frame component is 300 pixels wide and 200 pixels high, the upper, right-hand corner has (X, Y) coordinates of:
Question 24
Multiple Choice
What will happen if you use instead of in an HTML document?
Question 25
Multiple Choice
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 } What shape will the oval have?
Question 26
Multiple Choice
An applet using a Swing GUI is extended from this class.
Question 27
Multiple Choice
What does the HTML tag <hr /> cause to happen?
Question 28
Multiple Choice
To support the Swing classes in applets, some browsers require a ________, which is software that extends or enhances another program.
Question 29
Multiple Choice
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"?
Question 30
Multiple Choice
Which of the following can a mouse listener respond to?
Question 31
Multiple Choice
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.
Question 32
Multiple Choice
In an applet, events are handled:
Question 33
Multiple Choice
If an applet attempts to violate one of the JVM restrictions:
Question 34
Multiple Choice
Given the following code, how many times per second will the TimerListener event be generated? Timer timer = new Timer(1000, new TimerListener() ) ;
Question 35
Multiple Choice
Which of the following sound file formats does Java not support?
Question 36
Multiple Choice
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.
Question 37
Multiple Choice
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 }