CIS3931 Intro to JAVA Programming

Assignment #6 – A JAVA Web Browser

 

Overview

 

For this assignment, you will be creating a small web browser in JAVA.

 

 

Details

 

 The GUI interface for your web browser should match the following example :

 

 

 

The title of the JFrame should be  “YOURLASTNAME Web Browser” .

 

You will create two “Boxes”. The first will contain the JLabel that says “Location” and the JTextField for the URL. The second will contain the JButtons with labels “back”, “forward”, “home” and “reload”.

 

These two boxes should be contained inside of a JToolBar which is then places at the top of the screen.

 

Below the JToolBar will be a JEditorPane. It will be of type HTML and should be set to non-editable. The JEditorPane will be scrollable.

 

Your web browser should start on the page http://www.google.com

 

The home button should take you to http://www.cs.fsu.edu/~cis3931

 

The forward and back buttons should behave exactly as they do in any other web browser. This means that the forward button should be disabled if there are not more pages in front of the one your are viewing. Similarly, the back button will be disabled if there are no more pages behind the one you are viewing. These buttons are worth 10 points (out of 100) of the program grade. The proper creation of these buttons is not exactly easy. A sample “run through” on the creation will be discussed in class … however, creating the actual code will be up to you.

 

 

The reload button should use the build in JAVA command to reload a page (discussed in class).

 

 

 

 

Actual Program Output

 

Your program should look like the example picture above. 

 

 

Grading

              

5 points – Name, date, and assignment number on top of program

20 points – Proper commenting

15 Points – Programming style

50 Points – Program has all of the elements listed in the description (not including back and forward buttons)

10 Points – The back and forward buttons work correctly

 

Total : 100 points

 

 

Extra Credit Opportunities

 

10 pts. : Add a “search” text field to your program that will automatically perform a search using one of the major search engines (google, yahoo, etc.)

 

10 pts : Add icons to your home, back, forward, and reload buttons.

 

15 pts : Implement a “history” menu that stores every page visited. Make sure it does not store duplicates.

 

15 pts : Implement a “view source” button that will display the HTML source code of the current page being viewed.

 

 

Grading explanation

 

Name, date, assignment number

   Your program should have the following header format

   /*

   Name : {YOUR NAME HERE}

   Date : {PROGRAM SUBMISSION DATE}

   Assignment : {ASSIGNMENT NUMBER AND TITLE}

   */

 

Proper commenting

   Your program should be properly commented. This means that a person who is unfamiliar with the JAVA programming language should be able to understand what each line/section of your code is doing by simply reading your comments. There is no such thing as too much commenting, so feel free to comment as much as you want.

 

Programming style

   This is a catch “all” for many things. Your program should be indented correctly. The code should be easy for the grader to read. You should optimize your code so that you are meeting the objectives in as little lines of code as possible. You should attempt to use the most advanced programming technique possible to complete the objective. For example, use loops instead of manually repeated the same block of code. Your variable names should be clear and concise.

 

Program has all of the elements listed in the description

  Please be sure to read the details section very carefully to be sure that you have all of the required elements.

 

 

 

Program due date and submission instructions

 

This program is due no later than Tuesday, 26th July, 05.

 

The program should be named Assignment6YOURFULLNAME.java

(Example : Assignment5RobertThornton.java)

 

You are to submit your source code (your .java file) to cis3931 at cs dot fsu dot edu

 

For assignment clarifications, please e-mail thornton at psy dot fsu dot edu

 

For help with your program, please e-mail cis3931 at cs dot fsu dot edu