my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Flickering in Canvas (Yes, I've read all older posts... but the problem stands) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Flickering in Canvas (Yes, I Watch "Flickering in Canvas (Yes, I New topic
Author

Flickering in Canvas (Yes, I've read all older posts... but the problem stands)

Jeronimo Backes
Greenhorn

Joined: Sep 20, 2004
Posts: 29
I'm creating a canvas where the user can create a diagram, so he draw some circles, links between them, etc.

The problem is that when the canvas is updated (e.g. the user moves a line) a great flickering happens. So, the closer I came up was with that code, but if a component is moved, it leaves its "trail". The latter image remains, after the component in its new position is drawn.

I've already searched in all the posts of this forum, and implemented as suggested (it's always the same resolution)... But it just don't want do work with me. Take a look at the code:





I made everything I could think. Someone can please tell me what is wrong?
[ August 09, 2005: Message edited by: Jer´┐Żnimo Backes ]

The art of being crazy is to NEVER commit the crazyness of being normal.
Jeronimo Backes
Greenhorn

Joined: Sep 20, 2004
Posts: 29
Ha! I'm a lame!

The GREAT and FANTASTIC problem is solved painting the background in white and then draw.



FANTASTIC!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Flickering in Canvas (Yes, I've read all older posts... but the problem stands)
 
Similar Threads
Double Buffering Question ? HELP ?
hide object
Double Buffering Problem
Painting components over images
How to move images?