cs349 - Developing User Interfaces - Spring 2005

Assignment 3 - Layout, Java Swing - Resources.

Swing

In this assignment you will be using the 1.4.2 version of Java. The compilation commands you need are the same as in Assignment 2.

For precise documentation on the class hierarchy, methods, events and such like I primarily use the Java web-site supplied by Sun. Here is the starting point for the 1.4.2 documentation. The packages you will be most interested in are java.awt, java.awt.event and javax.swing.

Here are two different swing tutorials from Sun.

Starting code

Three pieces of code are available in /u/cs349/assignments/a3 to help you.

  1. MyTree2.class, a class that encapsulates a tree. Each sub-tree of the tree is also an object constructed from MyTree2.
  2. TreeTest.java, a simple test application showing you how to use the MyTree2 class.
  3. TreeView.java, a simple application showing how layout can change what appears on the screen.

Return to: