• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

flickering of image when using a scrollPane  RSS feed

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
g'day, i have a problem when using ScrollPane in my applet
i am using a scrollPane of size (400,400) to display an image that is on a canvas of size (900,600). I have changed the canvases' update method to stop the canvas from clearing before it redraws and am using a double buffering technique to stop the canvas from drawing until the image is finished, but none of this has helped to stop the flickering that occurs every time i move one of the scrollpanes slider bars.
if anyone has any ideas, please let me know.
Thanx for any help u can offer
p.s. i don't want to have to use swing components, unless i have to.
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hey, didn't we decide that it was impossible??

From your post, I think you're looking in the wrong place -- it's not the canvas that has to be careful with it's <code>update()</code>, it's the <code>ScrollPane</code>. Subclass that and override <code>update()</code> there.

<code>update()</code> forwards the call to any children, so you probably actually need new updates for both the <code>Canvas</code> and the <code>ScrollPane</code>. Hope it helps, man.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!