I produce a dynamic slide show dialog to display selected .gif or .jpeg images.

The process is working great except the very first slide is not drawn to the JPanel [imagePanel] of my dialog window. I have added debug code to ensure that the image is selected properly during this processing.

I am using Java2D but have returned to Java 1D during my debug process in an attempt to assure myself that the error is not Java2D related. The same error occurs.

I have <<, <, >, >> controls working and successfully display the first slide when I move to the 2nd Slide [>] and then return to slide # 1[<] or [<<]

I am not working with a JPanel sub-class with a 'paint' method override.
Is that my problem or am I overlooking something that is required to flush the first image?

Note that the problem does not occur when selecting a different slide set but does occur if I close the class that displays the slide show dialog and re-select the slide show option.

Java Code:
private static JPanel imagePanel = null;
imagePanel = new JPanel();
String imageFileName = slideFileNames[currentSlide];
ImageIcon imgIcon = JHDD_IO.getIcon(
    imageFileName, "JDocumentation.showSlides");
Image img = imgIcon.getImage();
//	Set the image width and height parameters [w,h]...
int w = imgIcon.getIconWidth(); 
int h = imgIcon.getIconHeight();
//	Ensure that the image is loaded properly via 'MediaTracker'...
MediaTracker tracker = new MediaTracker(imagePanel);
//	If the 'image' is NOT Null
if (img != null) {
    tracker.addImage(img, 0);
    try {
    } catch(InterruptedException ie) {}
}	//	End 'img' : null IF...
//	Else 'img' is 'Null', Soft Abort...
else {
    ...}	//	End 'img' : null IF...
//	Build the  'BufferedImage' shell [bufImage]... 
BufferedImage bufImage =
    new BufferedImage(w, h,   BufferedImage.TYPE_INT_RGB);
//	Get the 'bufImage' 2D Graphics instance [g2D]...
Graphics2D g2D = bufImage.createGraphics();
//	Draw the given 'Image' into the 'BufferedImage' [bufImage]...
g2D.drawImage(img, 0, 0, imagePanel);
//	Resize the Buffered Image [loadImage] = F[bufImage]...
BufferedImage loadImage =
    new BufferedImage(WIDTH, HEIGHT, bufImage.getType());
//	Get the 'loadImage' 2D Graphics instance [g2D]...
g2D = loadImage.createGraphics();
//      Draw the image...
    0, 0,
    WIDTH, HEIGHT, // Dialog window parameters...
    0, 0,
    w,h,                  // 'img' parameters...
//	Draw the JPanel = F[imagePanel]...
g2D = (Graphics2D)imagePanel.getRootPane().getGraphics();
g2D.drawImage(loadImage, 0, CB_HEIGHT, imagePanel);
//	Show the constructed image Icon in the JPanel [imagePanel]...