Java Reference
In-Depth Information
*13.32
( Geometry: two rectangles ) Write a program that passes the center coordinates,
width, and height of two rectangles from the command line as follows:
java Exercise13_32 x1 y1 w1 h1 x2 y2 w2 h2
The program displays the rectangles in a panel and a message indicating whether
the two are overlapping, whether one is contained in the other, or whether they
don't overlap, as shown in Figure 13.35b-d. Display the message in a label. See
Programming Exercise 10.13 for checking the relationship between two rectangles.
 
Search WWH ::




Custom Search