Microsoft SDK for Java

getDeviceFromGraphics

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.

Syntax

public final static Device getDeviceFromGraphics(Graphics g) throws DeviceException;

Parameters

g An extended graphics context, either a com.ms.fx.FxGraphics or a GraphicsX object.

Exceptions

com.ms.awt.DeviceException if the graphics context is not valid.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.