Putting It All Together—The Art Display Applet

Now that you've seen how the various graphics primitives work, you can put them together to build a graphics-intensive applet. Suppose an art dealer has hired you to build a Web site that displays pieces of art online. In addition to showing the art, the dealer wants to allow customers to select a frame and matte. You might write the HTML shown in Listing 38.5.

Code Listing 38.5. Frames.html—The User Chooses a Frame, Matte, and Piece of Art to Display
 <HTML> <HEAD><TITLE>Demo of Frames</TITLE></HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- // set the applet's frame property based on the value selected function setFrame(theObject) { //alert("got: " + theObject.options[theObject.selectedIndex].value); ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.