ch13 - 87 Chapter 13 A PPLETS AND HTML A PPLETS AND HTML...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 87 Chapter 13 A PPLETS AND HTML A PPLETS AND HTML 13.1 HTML 89 HTML Basics 89 Programming Tip A Simple HTML Document Outline 91 Inserting Hyperlinks 92 Gotcha Not Using Your Reload (Refresh) Button 94 Displaying a Picture 96 13.2 A PPLETS 97 Applet Basics 97 Programming Example An Adder Applet 100 Running an Applet 100 Placing an Applet in an HTML Document 103 Programming Tip Converting a Swing Application to an Applet 103 Adding Icons to an Applet 106 Gotcha Using an Old Web Browser 109 The Older Applet Class (Optional) 109 Applets and Security 110 Chapter Summary 111 Answers to Self-Test Questions 111 Programming Exercises 112 A PPLETS AND HTML A PPLETS AND HTML The web of our life is of a mingled yarn, good and ill together. W ILLIAM S HAKESPEARE , Alls Well That Ends Well All that has come before this chapter is important to learning how to program and to learning the Java language. However, we have not yet touched on the thing that initially made Java famous. Java became famous in large part due to its connection to the Internet. In this chapter, we describe a version of Java programs that can be run across the Internet. The World Wide Web (Web for short) is the collection of locations on the Internet that you can view with a web browser. Applets are simply Java pro- grams that are designed to run from a document (page) on the Web. HTML is a lan- guage used to create web documents. A Java applet runs from within an HTML document, so we will say a bit about HTML before we discuss applets. Objectives Learn to write a simple HTML document. Find out how to write applets and how to embed an applet in an HTML document. Prerequisites To really get much benefit from this chapter, you should know how to use a web browser such as the Netscape Navigator or Microsofts Internet Explorer. All the constructs discussed in this chapter produce things to be viewed via a web browser. We will assume that you have used a web browser to read something on the Web, but will not assume that you know how to create things to be viewed on the Web. Most readers could get sufficient experience by simply playing with a web browser without any instruction or reading. To get the full benefit of this chapter, you should also un- derstand how path names are used on your operating system so that you can name a file that is contained in a different directory (different folder). Section Prerequisite Section 13.1 None Section 13.2 Chapters 15, 7, and 12, as well as Section 13.1 web browser 13.1 HTML 89 13.1 HTML You shall see them on a beautiful quarto page, where a neat rivulet of text shall meander through a meadow of margin. R ICHARD B RINSLEY S HERIDAN , The School for Scandal Documents designed to be read on the Web, or through a web browser whether or not they are on the Web, are typically written in a language called HTML . HTML stands for Hypertext Markup Language. Hypertext is simply text that contains items that you can click with your mouse to go to another document. These connectionsthat you can click with your mouse to go to another document....
View Full Document

This note was uploaded on 04/29/2010 for the course CS 5503 taught by Professor Kaylor during the Spring '10 term at W. Alabama.

Page1 / 26

ch13 - 87 Chapter 13 A PPLETS AND HTML A PPLETS AND HTML...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online