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?
A) Oblong, width greater than height
B) Oblong, width less than height
C) Circle
D) Cannot tell
Correct Answer:
Verified
Q20: Due to security restrictions, applets cannot:
A) Delete
Q21: These are Java programs that are usually
Q22: A mouse motion listener class can respond
Q23: If a frame component is 300 pixels
Q24: What will happen if you use
Q26: An applet using a Swing GUI is
Q27: What does the HTML tag <hr />
Q28: To support the Swing classes in applets,
Q29: Look at the following applet code:
1 import
Q30: Which of the following can a mouse
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents