Hello openoffice.org mailing list, hello Matthias,

I'm still investigating my focus problem. I use OOoBean to embed OpenOffice.org in a eclipse RCP client. I tested the application under KDE (gentoo + suse 10.1), Gnome (Gentoo) and Windows.
- Under KDE, OpenOffice.org would sometime "steal" the focus.
- Under Gnome, OpenOffice.org would never get the focus.
- Under Windows XP, OpenOffice.org would never get the focus too.

I'm not sure if it is a SWT problem, an OpenOffice.org problem... or something else. I would like to investigate more about this problem, however I don't know how.

This is the code I use to add the OOoBean to a AWT pane:

       JRootPane root = new JRootPane();
       OOoBean bean = new OOoBean();
       contentPane.add(bean);

and this is how I added the Panel to the SWT frame:
       Frame frame = SWT_AWT.new_Frame(parent);
       Panel panel = new Panel(new BorderLayout());
       frame.add(panel);
       panel.add(root);
       Container contentPane = root.getContentPane();

Regards,
Daniel


Daniel Beck wrote:

Hello openoffice mailing list,

    I integrated OpenOffice.org into a SWT+java based application.
OpenOffice.org is only one part of the GUI. OOo seems to "steal" the
focus to the other components of that GUI: it is not possible to enter
characters in any other window. Instead, each time I enter a character,
it is written in the opened OpenOffice.org document.

I want to remove the focus from OpenOffice.org each time a user selects
an other widget of the Java GUI (i.e. if the users selects a text input
form, the focus should be removed from OpenOffice.org and given to the
input form).

I saw that "XWindow" has a "setFocus" method, but no "removeFocus" method.

How can I remove programmatically remove the focus from OpenOffice.org?

You can't; and besides that it doesn't make sense. Setting the focus
into the window of another application should be enough. BTW: if that
doesn't work I assume a hypothetical "removeFocus" wouldn't work either.

Usually OOo doesn't "steal" the focus. If that happens in your Java
appliation embedding OOo I assume that it's a tricky Java/OOo problem.
Could you please tell us what you are using exactly:

OS version (including Desktop version if not Windows)
Java version
OOo version

And are you using the OOo bean?

Ciao,
Mathias



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to