Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11496

Re: Applet and parent browser

From simplicity <stella_pigeon@live.ca>
Newsgroups comp.lang.java.programmer
Subject Re: Applet and parent browser
Date 2012-01-19 08:48 -0800
Organization http://groups.google.com
Message-ID <66a0a1b0-e7cb-42f8-b83f-57322e778324@y5g2000pbk.googlegroups.com> (permalink)
References <935e02a3-a6b5-4325-8938-0bb41c1c2832@3g2000pbd.googlegroups.com> <4f177767$0$285$14726298@news.sunsite.dk>

Show all headers | View raw


On Jan 18, 6:52 pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
> On 1/18/2012 6:05 PM, simplicity wrote:
>
> > Is it possible to get the reference to browser window which contains
> > the applet?
>
> > I tried Window win = (Window)this.getParent() but I do not know what
> > it really returns.
>
> > I tried to verify what the above might be by looking at win.getName().
> > I am getting "frame0" while the browser window name is
> > "<document.title>  - Windows Internet Explorer".
>
> Try:
>
> JSObject window = JSObject.getWindow(this);
>
> to get out in the browser and window.gtMember("title") for actually
> getting the title.
>
> Untested!
>
> Arne

Did not work. According to the documentation JSObject.getMember
returns equivalent to javascript this.name. I tried it and it yields
null.

However, the title is not what I need. As I mentioned in the original
email, I need my applet to obtain the reference to the parent window
(the browser). I need it to feed the specific API which will register
the application with the hardware and allow me to pass the hardware
events to the applet. This API takes the top level window as a
parameter

It is easy for a standalone application - just pass JFrame to API. I
need the equivalent of this when the application runs inside the
browser.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Applet and parent browser simplicity <stella_pigeon@live.ca> - 2012-01-18 15:05 -0800
  Re: Applet and parent browser Arne Vajhøj <arne@vajhoej.dk> - 2012-01-18 20:52 -0500
    Re: Applet and parent browser simplicity <stella_pigeon@live.ca> - 2012-01-19 08:48 -0800
    Re: Applet and parent browser simplicity <stella_pigeon@live.ca> - 2012-01-19 14:58 -0800
      Re: Applet and parent browser Roedy Green <see_website@mindprod.com.invalid> - 2012-01-23 18:29 -0800
  Re: Applet and parent browser Roedy Green <see_website@mindprod.com.invalid> - 2012-01-20 08:31 -0800

csiph-web