Wednesday, October 12, 2005

A simple Java program to do Rectangle Placement

A simple java program to place some rectangles given their coodinates and sizes.

The input file should follow the format of

x1, y1 , width1, height1
x2, y2 , width2, height2
...


or if a label is attached to each rectangle, the format change to

label1, x1, y1 , width1, height1
lable2, x2, y2 , width2, height2
...

A simple test case

A 0 0 5 5
B 6 6 4 7
C 1 5 3 5


Output is




Try to increase the scale asked by the program if the graph squeezed together.

Download the executable jar file here.
Download source code here.


Hello Blogger

Hello world !