This method of the Device Class retrieves a device, given a graphics context. The device created is an instance of the DisplayDevice or the PrinterDevice class.
public final static Device getDeviceFromGraphics(Graphics g) throws DeviceException;
g | An extended graphics context, either a com.ms.fx.FxGraphics or a GraphicsX object. |
com.ms.awt.DeviceException if the graphics context is not valid.