CS 338: Graphical User Interfaces

Assignment 0: Getting Started

No submission necessary


This assignment aims to make sure that you have the programming infrastructure to complete the upcoming GUI assignments. The simple GUI components included in the test code will ensure that you can compile and run Java Swing code on the UNIX machines and on your own personal machines (if you choose).


Before getting started, make sure you have an CS account (not simply a Drexel account); if you don't, please go to the CS Department's Accounts page and follow the instructions to create an account from your main Drexel account. The easiest way is to do the assignment on the CS cluster machines through tux.cs.drexel.edu or another CS machine. Your Java setup will depend on what type of machine you are using: If you wish to develop your Java code on your own machine, you can refer to the course web site's Resources page for some tips. Depending on how you do things, you will need to run some form of window manager and X Windows, since your code will create a new window to be displayed on the screen; if you don't know how to do this, it might be best to stick to the cluster machines. Please note two things: (1) all testing and grading will be done on tux, so even after you complete the assignment, you should test your programs on tux before submitting them to ensure that they work as advertised; (2) because everyone has different machine preferences, (beware of upcoming legalese) this course and all affiliated with said course cannot be responsible for any problems involving your home setups. If you have been able to get your home machine running Java in an interesting way, please email the instructor and she will post this information to the class in case anyone else could use this information.

You should now make sure that your setup is correct for compiling and running Java and Swing programs. First, download and unzip the test program A0Test.java. Next, try compiling and running this test program; in UNIX (and some other systems), you would enter the following on the command line:

    javac A0Test.java
    java A0Test
You should also try running this program on your home setup if you will be developing Java code on your own machine. If all goes well, you will see a small window with a button labeled "Click Me!" and a text field next to it full of dashes. If you click on the button, a counter appears starting with "1", and every subsequent click will increment the counter. Assuming you can get this to work, you are properly set up to start the upcoming assignments.


This first assignment will not be graded -- rather, it is intended to give you a first taste of compiling and running Swing code. We expect that you can complete this assignment without difficulty. If you do have problems with the assignment and/or feel that you may difficulties with the programming in the rest of the course, you should contact the professor to discuss your situation.