The application is to display a geographic map from a .gif and then draw vectors on top to show locations of features. Then the user can change the geographic location. A GIS will generate a new map .gif which must be read and displayed. The task of this code then is to show loading an image and then replacing with another image. The behavior (with Java 1.2 and 1.3) is that the first image is loaded and displayed but when it tries to replace the first image with the second image, the window does not change. Can anyone correct my approach? Thanks in advance.
[This message has been edited by Paul Wheaton (edited September 18, 2000).]
You may try jframe.validate(); before repaint(). if you want the second image to overlap on first image, you may have to remove the icon from panel also. You may also increase the sleep time from 3000 to 5000 or 6000. This will give some time for the image to load. Jay
Joined: Aug 26, 2000
The solution I have settled on is to invoke drawImage directly in the paint() method of the container. Thanks for the suggestions / help. Here's the skeleton that works: