Hello all....I'm stumped here and hope someone can offer some advice. I'm trying to do embed an OpenOffice writer control (the OfficeBean) into my application for document editing. The entire application is basically written and this is a graft on feature. My problem is that the entire application has an MDI interface using JInternalFrames, which are lightweight components, and the OfficeBean is a heavyweight component. I can make my proof of concept work when embedding the OfficeBean on a JFrame, however it does not work when embedded on a JInternalFrame. When resizing/minimizing/maximizing the JInternalFrames the OfficeBean control gets messed up and sometimes disappears from the screen. I am familiar with Sun's suggesstions on mixing Heavyweight and Lightweight components at http://java.sun.com/products/jfc/tsc/articles/mixing/, and so I do understand that what I am trying to do isn't officially supported.
My question is this: 1) Does anyone have any "magic" on how to embed heavyweight beans onto lightweight JInternalFrames? 2) Or, does anyone know of anyway to make the OpenOffice/Star Office bean lightweight? I would hope that Sun is working on this for Star Office, but I do understand the complexity involved also. I would assume that people have this same problem in trying to embed any heavyweight components into their JInternalFrames such as ActiveX controls, Internet Explorer, or old heavyweight AWT based javabeans.. If you have suggestions on how you did it for your own component then I'd love to hear them! Alternatively, does anyone know if the API or componentry will be changing in OpenOffice 2.0? Perhaps the OpenOffice bean may work with lightweight components once 2.0 is out? Also, if anyone else is trying to embed OpenOffice writer into their app then I would be interested in swapping design patterns and code with you . Maybe we can learn some things from each others code. Right now I'm basically using the OfficeBean as is, and when I need to automate some functionality I just use the macro recorder to record the commands, and then translate that to UNO java code. Thanks for your time and help! Tim Archer
