The Graphics2D class
Additional graphics 2D drawing capabilities are found in the java.awt package added in JDK1.2. (This is not, apparently, part of the Swing set.)
The Graphics2D class is a subclass of the Graphics class, so converting the graphics context to this class enables the additional methods to be called. . . . public void paint ( Graphics g ) { Graphics2D g2d = ( Graphics2D ) g; . . . }
Note that there are also packages for 3D graphics and other media frameworks not covered in this talk.