Animation: BufferedImage and Graphics2D
Hello all,
I am new to Java animation.
Now I want to write an animation showing the tracks of some points. The position of the points are allocated according to some blocks of data in somewhat time interval, for instance, every 2 seconds.
So I want to draw out the position of points for each interval, one drawing for one internal, and regard the drawings as objects of Image, alternatively as objects of BufferedImage. So that I can use them as images in sequence and then show them as animation later.
In my mind, i should create an object bImg of BufferedImage. and then an object grph of Graphics2D,
BufferedImage bImg = new BufferedImage(10, 10, 1);
Graphics2D grph = bImg.createGraphics();
Then drawing using grph.
Now the Question: I dont know clearly what is the relationship HERE between BufferedImage and the Graphics2D, alternatively bImg and grph.
Thanx in advance!
cluoyan

