![]() ![]() Applets access their attributes with the getParameter( ) method. PARAM NAME AND VALUE The PARAM tag allows you to specify appletspecific arguments in an HTML page. They’re treated the same as the IMG tag’s VSPACE and HSPACE attributes. HSPACE specifies the space, in pixels, on each side of the applet. VSPACE specifies the space, in pixels, above and below the applet. VSPACE AND HSPACE These attributes are optional. This attribute is treated the same as the HTML IMG tag with these possible values: LEFT, RIGHT, TOP, BOTTOM, MIDDLE, BASELINE, TEXTTOP, ABSMIDDLE, and ABSBOTTOM. WIDTH AND HEIGHT WIDTH and HEIGHT are required attributes that give the size (in pixels) of the applet display area.ĪLIGN ALIGN is an optional attribute that specifies the alignment of the applet. To obtain an applet by name, use getApplet( ), which is defined by the AppletContext interface. Applets must be named in order for other applets on the same page to find them by name and communicate with them. ![]() NAME NAME is an optional attribute used to specify a name for the applet instance. This is distinct from the alternate HTML you provide for browsers that don’t support applets. This file is relative to the code base URL of the applet, which is the directory that the HTML file was in or the directory indicated by CODEBASE if set.ĪLT The ALT tag is an optional attribute used to specify a short text message that should be displayed if the browser understands the APPLET tag but can’t currently run Java applets. The CODEBASE does not have to be on the host from which the HTML document was read.ĬODE CODE is a required attribute that gives the name of the file containing your applet’s compiled. The HTML document’s URL directory is used as the CODEBASE if this attribute is not specified. Bracketed items are optional.ĬODEBASE CODEBASE is an optional attribute that specifies the base URL of the applet code, which is the directory that will be searched for the applet’s executable class file (specified by the CODE tag). The syntax for the standard APPLET tag is shown here. Now it is time to take a closer look at it. ![]() So far, we have been using only a simplified form of the APPLET tag. (The newer OBJECT tag also works, but this book will use APPLET.) An applet viewer will execute each APPLET tag that it finds in a separate window, while web browsers like Netscape Navigator, Internet Explorer, and HotJava will allow many applets on a single page. The APPLET tag is used to start an applet from both an HTML document and from an applet viewer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |