Experiments in Java


Notes on Session G3: Java's Abstract Windowing Toolkit, Continued

Experiment G3.1, Step 2. Since the string associated with the Help button has changed, clicking on it no longer has any apparent effect.

Experiment G3.1, Step 3. Now we check which string is associated with the Help button and can therefore accommodate any changes to that button we'd like.

Experiment G3.1, Step 5. Because the space for the label was predetermined, the new help message overflows the label. We'll need to figure out a way to expand the label and possibly the window.

Experiment G3.1, Step 7. The label should expand, and the window should also expand to make room for the expanded label, with everything else shifting slightly.

Experiment G3.1, Step 9. The label moved. This suggests that each component can only be added once. If you try to add it a second time, the original copy is removed.

Experiment G3.1, Step 10. You should get an exception. The problem is that you can only add components at an appropriate position. If there are n components, they should be at positions 0 through n-1.

Experiment G3.2, Step 1. As mentioned in the previous laboratory session, you quit this application by closing the window.

Experiment G3.4, Step 1. As mentioned in the previous laboratory session, you quit this application by closing the window.

Experiment G3.5, Step 4. There are a number of places in which it is assumed that we're adding integers.


Copyright (c) 1998 Samuel A. Rebelsky. All rights reserved.

Source text last modified Mon Oct 25 23:31:26 1999.

This page generated on Tue Oct 26 15:36:31 1999 by Siteweaver.

Contact our webmaster at rebelsky@math.grin.edu