Ole,
Ole Baunb�k Jensen wrote:
>
> 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.
Try reading the article called "Painting in AWT and Swing", by Amy
Fowler, on the Swing Connection at this URL:
http://java.sun.com/products/jfc/tsc/index.html
This site is currently in redesign, so you may have to wait for a while
for the older articles to be made available.
Hops this helps,
Sandor
--
ir A.G.L. Spruit - Utrecht University - mathematics & computer science
information science group
===========================================================================
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".