• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bouncy ball applet image problem

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy JavaRanch!
I have a small problem with a applet I have been tinkering around with. I am trying to get a ball to bounce around within the boundaries of the applet window, it works, well sort of...
My problem is this, when I call to repaint(); the images flicker too quickly or something and I cant see the images but they are moving. I can tell this because the ball flickers in and out of existence too quickly. When I dont call to repaint(); the ball/image sits there and does nothing, unless you resize the applet window, then it starts moving. I have two class files, one that paints and updates the applet, the other which is the Ball class controls all of the Ball like logic. Please let me know if you see a glaring problem, that would be nice. Thanks for looking at this stuff. I did do a search on these forums and tried to relate others code to mine but I dont see anything wrong with mine.
Thanks,
-Tom Reese
Here it goes..dum dum dum

 
Tom Reese
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind, my code is working fine except my ball logic is flawed, I viewed this applet on my desktop computer and it runs fine except the images need to be double buffered. Thanks anyways!

-Tom Reese
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic