Page 1 of 1

OOoBean in 2 Java windows, one disappears

PostPosted: Thu Apr 08, 2021 12:31 pm
by oliviergeorg
Hi everyone,

I am working on a Java legacy code to show o edit some odt documents in a web application. I have to solve a problem that I do not know how to tackle!

The documents used to be displayed using an applet, and the OOoBean within the applet. But due to security problems, that was replaces a custom browser uri scheme, ooviewer:..., that launches a java desktop application with the ooobean inside.

Now the problem I have been told to solve is that when 2 windows are opened, the first ooobean disappears when the second window is opened. Exactly when the method setVisible is called on the JFrame object.

I suppose it could be some kind of swing or awt hierarchy that cannot be displayed twice, i.e. in both windows, a problem I had had in a former project.

I could show you some code, but I do not know what could be important/interesting

(Note that I did not write the original applet code, nor the transformation to desktop application. Also the version of openoffice is 3.1)

Thanks in advance

Olivier Georg

Re: OOoBean in 2 Java windows, one disappears

PostPosted: Thu Apr 08, 2021 1:10 pm
by RoryOF
I can't answer your specific problem, but I offer a small piece of information that might be relevant.

MS Office supports MDI (Multiple Document Interface), which I understand allows multiple windows from the one running instance of MS Office's code. Because of its cross-platform capability, OpenOffice only supports SDI (Single Document Interface), as MDI libraries of identical behaviour are not (certainly were not - situation may have changed?) available for all platforms, so if one wishes multiple windows of documents in OpenOffice one has to use multiple running instances of the code.

The above information is a memory of perhaps 10/12 years ago, and the availability of such libraries may have changed, but they are not currently employed in OpenOffice (I don't know about LibreOffice). You may be running into some instance of this SDI restriction.

Re: OOoBean in 2 Java windows, one disappears

PostPosted: Thu Apr 08, 2021 1:57 pm
by oliviergeorg
Thanks Rory for your quick answer,

So you mean I would need several underlying instances of soffice.exe running in the background or several jvm? I do not think i need several soffice.exe, since using applets (2 web pages each with its applet and ooobean) it runs just fine