jacoZoom OLE Document Sample : JWinDoc.java
This basic sample demonstrates the embedding of OLE documents in a Swing application by using the jacoZoom-class JOleDocument.
The sample is part of the jacoZoom-download in the file JWinDoc.java.
The following screenshot shows the sample in action:
The sample is very generic, the code contains no specific interaction with the Word-object model.
The following code snippet shows how it works.
...
com.inzoom.axjni.JOLEDocument m_doc= new com.inzoom.axjni.JOLEDocument();
...
getContentPane().add(m_doc,java.awt.BorderLayout.CENTER);
...
m_doc.create("Word.Document");
By simply changing the OLE Document Id from "Word.Document" to another one - for example "Excel.Sheet" - another OLE document is displayed.
|
|