Java programs use an x,y coordinate system for all their graphic operations. The x coordinate is the pixel distance from the left. The y coordinate is the pixel distance from the top.

Note that the Java y coordinate system, like most other computer graphics systems, is different from the normal math coordinate system where the y coordinate goes up from the bottom.