To become familiar with Java and JFC/Swing programming
Write a Java program using JFC and the Swing components that allows you to select an image file to load (either a gif or jpg), displays it, and allows you to drag it around its window with the mouse.
In particular, your program should have a menu with three commands: "Open...", "Open URL...", and "Quit". Selecting "Open..." will present the user with a file browser that allows them to select a .gif or .jpeg file for loading. This browser should only show them directories and files with names that end in ".gif", ".jpg" or ".jpeg". Selecting "Open URL..." will present the user with a text entry box (containing a text entry line and "Cancel" and "Open" buttons) in which they can type a URL. "Quit" should quit.
The program window should contain a single Swing container with a paint method specified by you. This method should render the image with its upper left corner at the "current location". No image is displayed until the user loads an image. The initial "current location" for an image is (0,0) (upper left corner), but can be changed by the user with the mouse. When the user clicks in the window, the position clicked is the new "current location" of the image. If the user moves the mouse ("drags" the mouse) before releasing the button, the "current location" follows the mouse. When the mouse is released, the "current location" remains as the last mouse location and stops following the mouse.
Your program should consist of a single java file which should be commented with your name (the name you are registered under!) and ID number. The java file should implement a class "a1" (so the TA can save it as "a1.java", compile it and execute it using the command "java a1".) The file should be emailed as ASCII text to cs4470@cc.gatech.edu.
The time the mail is received will be used to determine whether or not the program is late, so be sure to allow a couple of minutes for the mail system to transmit your file if you are working right up to the deadline. If you find it necessary to send multiple files to the TA, tar them and then uuencode the results before mailing. (Using MIME attachments to turn in files will make the TA crabby and result in much tougher program grading!)
IMPORTANT: If the TA has to edit your files you will lose points. Similarly, the TA should be able to execute the class "a1", so using any other class as your main class will result in lost points.
This program is due on or before Friday, September 1st. This means it must be received by 11:59pm EDT on Friday to not be considered late.
Your program should create a window of at least 500x500 pixels, and handle window resizing properly.
There are no extra credit options on this assignment.