<< Chapter < Page | Chapter >> Page > |
This module is one in a collection of modules designed for teaching INEW 2338 Advanced Java (Web) at Austin Community College in Austin, TX. More specifically, it is one in asub-collection of modules designed for teaching network programming in that course. The purpose of this module is to show students how to use Java Swingto render a web page in a JFrame object.
I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.
In an earlier module, you learned how to connect to a website and cause a raw text version of a file to be downloaded and displayed. However, the display of raw HTMLtext isn't very useful, which is why rendering web browsers were invented.
In this module, you will learn how to connect to a website and cause an HTML file to be downloaded and rendered in a JFrame object. We will develop a program that makes it possible to follow hyperlinks much as you wouldexpect with a commercial web browser.
I will begin this explanation with a skeleton program that illustrates four important aspects of rendering a webpage in a Swing JFrame object :
(Note that there are alternatives to the first two items in the above list, which we will see later.)
To keep the code simple, two important aspects of webpage rendering will be omitted from this program:
These capabilities will be added to other programs later in this module.
Beginning of the program named Java4655c
Notification Switch
Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?