16.1 | Is every applet an instance of java.applet.Applet ? Is every applet an instance of javax.swing.JApplet ? |
16.2 | Describe the init() , start() , stop() , and destroy() methods in the Applet class. |
16.3 | How do you add components to a JApplet ? What is the default layout manager of the content pane of JApplet ? |
16.4 | Why does the applet in (a) display nothing? Why does the applet in (b) have a runtime NullPointerException on line 12? |
16.5 | Describe the <applet> HTML tag. How do you pass parameters to an applet? |
16.6 | Where is the getParameter method defined? |
16.7 | What is wrong if the DisplayMessage applet is revised as follows ? |
16.8 | What are the differences between applications and applets? How do you run an application, and how do you run an applet? Is the compilation process different for applications and applets? List some security restrictions on applets. |
16.9 | Can you place a frame in an applet? |
16.10 | Can you place an applet in a frame? |
16.11 | Delete super.paintComponent(g) on line 97 in TicTacToe.java in Listing 16.7 and run the program to see what happens. |
16.12 | How do you create a URL object for the file http://www.cs.armstrong.edu/liang/intro6e/book/audio/us.mid on the Internet? How do you create a URL object for the file http://www.cs.armstrong.edu/liang/audio/us.mid in the class directory? |
16.13 | How do you create an ImageIcon from the file image/us.gif in the class directory? How do you create an ImageIcon from www.cs.armstrong.edu/liang/intro6e/book/image/us.gif? |
16.14 | What types of audio files are used in Java? |
16.15 | How do you create an audio clip from a file anthem/us.mid in the class directory? How do you create an audio clip from http://www.cs.armstrong.edu/liang/intro6e/book/audio/us.mid? |
16.16 | How do you play, repeatedly play, and stop an audio clip? |