Microsoft SDK for Java

getDisplayContext

This method of the Device Class retrieves a display context usable on the device. If the display device is something other than a monitor (a printer, for example), the device context is obtained from the native peer object.

Syntax

protected int getDisplayContext(Graphics g) throws DeviceException;

Return Value

Returns zero if the device is the screen; otherwise, returns the handle of the device context.

Parameters

g The Graphics object to get the context for.

Exceptions

com.ms.awt.DeviceException if the graphics context is not an instance of the com.ms.fx.FxGraphics or GraphicsX graphics classes.

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