In computing, Java 2D is an API for drawing two-dimensional graphics using the Java programming language. Each Java 2D drawing operation can be treated as filling a shape using a brush and compositing the result on the screen.