I have a JFrame that is 500x500 and inside that is a DrawingPanel that is 2000x2000.

How would I change the view of the DrawingPanel so that I could see a different area other than from 0 to 500 in both the x and y directions?

For example, display in the DrawingPanel from 1000 to 1500 in both the x and y directions.