Please submit one file (HomeWork5.txt) with the answers to the following questions:
1. Choose differences between a JApplet and an Applet (choose as many as apply).
a) Applet is not available in Swing
b) JApplet is not available on AWT.
c) Applet is subclass of JApplet in
Java 1.2.
d) none of the above.
2. Answer True/False for the following:
Since Swing is more recent, it
does away with AWT (ie. you can do without AWT).
3. Explain the difference between a layout manager and a container.
4-6. Match up the layouts with the diagrams
BorderLayout
Figure 1
BoxLayout
Figure 2
FlowLayout
Figure 3
7-8. If you have an interface with several methods, what
is the advantage of adding an adapter class to wrap around that interface?
What is an adapter class used for?
(hint: see chapter 9)
9. A true statement about inner class I inside outer class
O is:
a) I can see all of O's instance variables
and private methods.
b) O can see all of I's instance variables
and private methods.
c) Every inner class has to be in
its own file just as is true with outer classes.
d) None of the above.
10. Arrange the following Event classes in order of inheritance(parent
to child).
java.awt.AWTEvent, java.awt.event.MouseEvent,
java.awt.event.ComponentEvent , java.awt.event.InputEvent