This method of the GraphicsX Class retrieves an an instance of a device class that the graphics object draws on.
public Device getDevice() throws DeviceException;
Returns an instance of the either the DisplayDevice or the PrinterDevice class.
com.ms.awt.DeviceException