Bounding Box

I have heard about bounding boxes in Java, and yet I cannot find anything on them, so I will ask my original question. How can I make images move around a page randomly and if they touch another image, an event occurs?
[225 byte] By [Zacha] at [2007-11-27 5:09:28]
# 1

A bounding box is just a generic concept of the smallest rectangular area that contains a visual item. Most components are rectangular anyway, so their width/height and location are the bounding box. If it's a circle, then just imagine it in a square that fits the circle, that's the bounding box.

The java.awt.Rectangle class is used for this, and contains methods to check if another rectangle intersects with it.

bsampieria at 2007-7-12 10:29:13 > top of Java-index,Java Essentials,Java Programming...
# 2

> A bounding box is just a generic concept of the

> smallest rectangular area that contains a visual

> item. Most components are rectangular anyway, so

> their width/height and location are the bounding box.

> If it's a circle, then just imagine it in a square

> that fits the circle, that's the bounding box.

>

> The java.awt.Rectangle class is used for this, and

> contains methods to check if another rectangle

> intersects with it.

Okay, thanks. You wouldn't know of a Tutorial for this, would you?

Zacha at 2007-7-12 10:29:13 > top of Java-index,Java Essentials,Java Programming...
# 3
These might help: http://java.sun.com/docs/books/tutorial/2d/index.html http://www.planetalia.com/cursos/index.jsp http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html
kevjavaa at 2007-7-12 10:29:13 > top of Java-index,Java Essentials,Java Programming...