EZ Jcom

Java to COM/ActiveX Bridge

Java access to ActiveX controls with visual UI

ActiveX (also known as OCX or OLE) controls that have a visual UI, can be placed in Java UI pages (e.g. Swing, AWT or SWT pages), but this requires at least Java version 1.3.

ActiveX controls with a visual UI require a window where they can display themselves. Therefore the Java program must provide a window.

EZ JCom includes a Java class ezjcom.JComActiveXContainer which is used to provide the display window to the ActiveX objects. This class derives from java.awt.Canvas, and can be used either in AWT or Swing programs, by adding it to a container such as a java.awt.Panel or javax.swing.JPanel or javax.swing.JFrame etc

The ActiveX controls must then be attached to the ezjcom.JComActiveXContainer object, by calling its setActiveX method.   The class generated by EZJCom for the ActiveX control also includes a convenience method setActiveXContainer for this purpose; it calls the container’s setActiveX method.

[NOTE for SWT Users:  SWT users must use ezjcom.JComActiveXContainerSWT instead of ezjcom.JComActiveXContainer.  It derives from org.eclipse.swt.widgets.Canvas, and can be used in a manner similar to ezjcom.JComActiveXContainer.]


The ActiveX Tutorial