Unlike your previous assignments, this program is a stand-alone application. This means that the program is run directly from the command line, rather than being started up by a browser. A stand-alone application is defined as by extending the JFrame class, instead of the JApplet class used in an applet.
cp ~gshute/public/cs2121/pa5-6.jar . jar xf pa5-6.jar rm pa5-6.jar cd pa5-6 lsThe first command copies the jar file to your own directory. The second unbundles it. This should create a new directory named "pa5-6". The third command removes the jar file, which is no longer needed. The fourth moves you into the pa5-6 directory, where you will do your work for the remaining programming assignments. The fifth displays the files contained in the new directory. You should see the following files.
The three .gif files are image files. They contain icons that you will use later for toolbar buttons. The two .java files are the source code files that you will be modifying in later steps. You should read the comments in these files to get an idea how the program works.
javac *.javaYou should not see any error messages.
java FileViewer
The program title, "File Viewer", should appear in the title bar at the top of the application window. The program should also display a text area with a scrollbar on the right side. It should be enclosed in a border with the title "File Contents". If you click in the text area and then type text at the keyboard, it should appear in the text area. Other than that, there is not much that you can do with the program at this time except to click on the close button in the title bar. The window should disppear.
If everything works as described, you are ready for Step 2.