How can you put a moving object into a buffer?

hallo there....

I made an bal that moves around the screen.. it has his own class...

every time i click on a button another one comes in.

as more as they come as more the balls start to flicker on the screen..

i don't know how to put an moving object into a buffer...

so if somebody knows how to put a ball that has his own class into a buffer so it will stop flickering...i would surely appreciate it

tnx already ;)

[461 byte] By [Monti81a] at [2007-10-2 7:40:45]
# 1
http://javaboutique.internet.com/tutorials/Java_Game_Programming/BildschirmflackernEng.htmlthats pretty much exactly what your looking for
muchosJavaa at 2007-7-16 21:24:29 > top of Java-index,Other Topics,Java Game Development...
# 2

I tried to put the moving object in a buffer that i made but then the whole screen started to flicker....

so i made an own class for the object.

It helped for a lil bit..

the screen stopped flickering but now i have to make the balls stop to flicker too. That's kind of the problem..

But maybe you got an solution for the first part of my problem that can forcome the whole screen to flicker asoon as i put a moving object into the buffer?...

tnx!

Monti81a at 2007-7-16 21:24:29 > top of Java-index,Other Topics,Java Game Development...
# 3
SORRY MAN...DIDN'T SEE THE LINK YOU ADDED ON...GONE CHECK IT OUT....TNX A LOT!!
Monti81a at 2007-7-16 21:24:29 > top of Java-index,Other Topics,Java Game Development...
# 4

Double buffering is a good solution of problems by rapid repainting in java as rapid repainting lets the screen flicker too much.

In Double Buffering we create an image in buffer memory after putting every object at its place on that image we simply draw that image on screen at every paint event.

Try it i thing this will solve ur problem.

vidhi_dwivedia at 2007-7-16 21:24:29 > top of Java-index,Other Topics,Java Game Development...
# 5

Is your program an application or applet?

If it's an applet, I found interesting information on:

http://www.dgp.toronto.edu/~mjmcguff/learn/java/07-backbuffer/

If it's an application, I was recently having a similar problem. You might be able to gather some useful information on:

http://forum.java.sun.com/thread.jspa?threadID=694079&tstart=0

DMTNTJGDa at 2007-7-16 21:24:29 > top of Java-index,Other Topics,Java Game Development...