Ole, you may try an updateUI() function call from your panel class after you
have done compositing your image.  I have an application that upon user's
input, the panel (JPanel) removes all its current child components, then it
adds the GLF's CompositionComponent object, then it calls the updateUI()
function to repaint the panel.

[EMAIL PROTECTED]
2101 CityWest Blvd.
Houston, TX 77042
713-918-7385 (voice)
713-918-1750 (fax)


-----Original Message-----
From: Ole Baunb�k Jensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 30, 1999 3:24 PM
To: [EMAIL PROTECTED]
Subject: [JAVA2D] paint/repaint/refresh/update?


Hello

In my GUI, i have a problem repainting the panel(jpanel) so that the image
that has to be updated, does not remain in the background? ive tried many
approaches, like paint repaint refresh update in the JComponent/graphics
class, does anyone have some examples showing how this should be done
properly.
I have this situation:
bufImage = pan(<Parameters>);
paint(g);

bufImage is the new picture i have to display in a JPanel. If the old
bufImage is bigger then the new resized(result of my pan-function), then
i still
have the old bufImage in the rest of the panel, behind the new image.
I have tried refreshing the whole panel and update the container.

oi

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to