Java examples for 2D Graphics:Dimension
Click the following links for the tutorial for 2D Graphics and Dimension.