Java Lab #11: GUI Programming

In this lab you will experiment with graphic user interface (GUI) programming using the Java Swing library.

Proceed as follows

  1. Modify Clacky one last time so that it has a simple graphic interface similar to that described in class for the TemplateFrame example. The idea would be to convert what you currently have as Clacky's main file into a frame (maybe ClackyFrame) with a constructor that sets up the frame. Most of what is currently in your main method, where the input line is processed, needs to be moved to the actionPerformed method of the action listener class.

    Notice that you need to first process the command line and then display the resulting stack rather than display the stack and wait for a command as the program currently does.

    You'll also need to introduce a new (small) main program similar to the TemplateMain example discussed in class.

  2. Finally do a right click on the Clacky project in Eclipse and "Export" a runnable jar file. You should be able to double click on the jar file and run the program from, for example, your desktop.

Turn in your modified files with appropriate comments. I'm mostly interested in (perhaps you renamed it to Be sure your name is on your submission.