Microsoft SDK for Java

HeavyComponent Interface

The HeavyComponent Interface of the com.ms.awt package is implemented by Java classes that require a Microsoft® Win32® system window (an HWND) for operations that access the native operating system. Java applets and applications that interact with the native system can use this interface with a java.awt.Canvas object to request a system window.

public interface HeavyComponent
{
  // Methods
  public boolean needsHeavyPeer();
}

The HeavyComponent interface is not cross-platform.

Currently, this interface only supports java.awt.Canvas objects. When a Canvas object that implements HeavyComponent is created, needsHeavyPeer is called to determine whether the Canvas object requires a Win32 window.

For example, the HeavyComponent interface is used for the Microsoft® ActiveX® component support. Java objects implement HeavyComponent and are assigned a heavy peer, and the ActiveX Control is hosted in that window.

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