If your circle image has a transparent background when you paint it over the rectangle it will only draw the opaque part of the image.
This way you can place one image on top of the other.
You just have to use a BufferedImage with alpha as your canvas:
BufferedImage.TYPE_INT_ARGB
i have other pic much more clearly show what i wants.
this:
http://i104.photobucket.com/albums/m173/finalmilk/ok.jpg
i want make this game the people stand on the blue Rect.
i want know how to make stand on that .
do you know what i means now?
Message was edited by:
nickgoldgodl
I already gave you the answer.
You create a [url http://java.sun.com/docs/books/tutorial/2d/images/drawonimage.html]BufferedImage[/url] with type [url http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/BufferedImage.html#TYPE_INT_ARGB]TYPE_INT_ARGB[/url] as your canvas.
Then you draw the background image first on the BufferedImage you created and finally you draw the character picture on the same BufferedImage in the location you want.
You just have to make sure that the character picture background color is transparent so it will not cover the background picture.
If you don't know how painting is done in Swing read this tutorial first:
http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html
And also this article:
http://java.sun.com/products/jfc/tsc/articles/painting