Inputstream/Outputstream Class Hierarchy?
Inputstream/Outputstream Class Hierarchy?
Panel
2. Name three Component subclasses that support painting.
The Canvas, Frame, Panel, and Applet classes support painting.
3. Name four Container classes.
Window, Frame, Dialog, FileDialog, Panel, Applet, or ScrollPane
4. What class allows you to read objects directly from a stream?
The ObjectInputStream class supports the reading of objects from input
streams.
5. Which java.util classes and interfaces support event handling?
The EventObject class and the EventListener interface support event
processing.
6. What is the difference between a Window and a Frame?
The Frame class extends Window to define a main application window that
can have a menu bar.
*7.What is the difference between the Reader/Writer class hierarchy and
the
InputStream/OutputStream class hierarchy?
The Reader/Writer class hierarchy is character-oriented,
InputStream/OutputStream class hierarchy is byte-oriented.
8.Life cycle of an applet includes which steps?
Life cycle involves the following steps
Initialization
Starting
Stopping
Destroying
Painting
and
the
Checkbox
Choice
Container
Label
List
Scrollbar
BasicSplitPaneDivider
Box
CellRendererPane
DefaultTreeCellEditor.EditorContainer JComponent Panel ScrollPane Window
15. Applets cannot perform actions such as reading/writing to the file
system
16. How does applet differ from applications? Applets cannot perform
actions such as reading/writing to the file system. Java applications run
standalone, outside the browser.
17. name some attributes of Applet tags?
height: Defines height of applet
width: Defines width of applet
align: Defines the text alignment around the applet
alt: An alternate text to be displayed if the browser support applets but
cannot run this applet
archive: A URL to the applet when it is stored in a Java Archive or ZIP file
code: A URL that points to the class of the applet
codebase: Indicates the base URL of the applet if the code attribute is relative
hspace: Defines the horizontal spacing around the applet
vspace: Defines the vertical spacing around the applet
name: Defines a name for an applet
object: Defines the resource name that contains a serialized representation of
the applet
title: Display information in tool ti
18. Explain how to set the background color within the applet area
You can set the background color of an applet in the following manner:
<applet code="MyApplet.class" width="100" height="100">
<param name="background-color" value="#ffffff">
<param name="foreground-color" value="#000000">
</applet>