Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

applet launches a browse resistent window

Thread view: 
VisionSet - 05 Jul 2006 11:24 GMT
I have an applet on every page of my web app that polls a servlet.
I wish to launch some flavour of popup that persists whilst the user
browses.

1/ Launching anything like a JFrame from the applet is destroyed after
a page nav.  I guess that all threads that are 'owned' by the applet
are destroyed, setDaemon(false) does not work.

2/ Launch a new browser window using
http://browserlaunch2.sourceforge.net/index.shtml But this does not
allow window sizing like a jscript popup does.

3/ Use JScript and launch the JScript from the applet.

So at the moment I'm concentrating on the 3rd approach, but since I
don't want the above list to grow into even more false trails, does
anyone else have suggestions.  JWS may be number 4.

Must be 1.5 and pref 1.4 compatible

Thanks,
Mike W
Andrew T. - 05 Jul 2006 12:05 GMT
..
> I wish to launch some flavour of popup that persists whilst the user
> browses.

You want, or your users want?
..
> 2/ Launch a new browser window using
> http://browserlaunch2.sourceforge.net/index.shtml But this does not
> allow window sizing like a jscript popup does.

JS from within the target page should be aple to resize it once
it opens (AFAIR), which should only have to occur once.
..
> So at the moment I'm concentrating on the 3rd approach, but since I
> don't want the above list to grow into even more false trails, does
> anyone else have suggestions.  JWS may be number 4.

I think JWS is your best bet here, which is ironic in that
the reason I usually reject the use of JWS'd applets is that
they _cannot_ be resized.

A JWS'd applet would fit your requirement to set the size
and allow you to do everything else you need, from within
a framework that is well supported by Sun (webstart).

Andrew T.
VisionSet - 05 Jul 2006 12:20 GMT
> ..
> > I wish to launch some flavour of popup that persists whilst the user
> > browses.
>
> You want, or your users want?

Its a chat window, the user will want it.  I coundn't care less, but
the boss wants it too...

> ..
> > 2/ Launch a new browser window using
[quoted text clipped - 3 lines]
> JS from within the target page should be aple to resize it once
> it opens (AFAIR), which should only have to occur once.

Yes, so I have discovered except BrowserLauncher + Mozilla = new tabs,
when resizing I want an exclusive window.

> ..
> > So at the moment I'm concentrating on the 3rd approach, but since I
> > don't want the above list to grow into even more false trails, does
> > anyone else have suggestions.  JWS may be number 4.

Do you know if I can call JScript from the applet?

> I think JWS is your best bet here, which is ironic in that
> the reason I usually reject the use of JWS'd applets is that
[quoted text clipped - 3 lines]
> and allow you to do everything else you need, from within
> a framework that is well supported by Sun (webstart).

Yes JWS is rapidly becoming likely, better learn how it works then...

Thanks,
Mike W
Andrew T. - 05 Jul 2006 13:00 GMT
> > ..
> > > I wish to launch some flavour of popup that persists whilst the user
[quoted text clipped - 4 lines]
> Its a chat window, the user will want it.  I coundn't care less, but
> the boss wants it too...

..always an important consideration.   ;-)

> > ..
> > > 2/ Launch a new browser window using
[quoted text clipped - 6 lines]
> Yes, so I have discovered except BrowserLauncher + Mozilla = new tabs,
> when resizing I want an exclusive window.

Aha.  Didn't realise that, though I'm rather glad to know
that FF does not actually spawn new browser instances -
all I ever wanted from BL2 was to get a web page before
the user's eyes (web connection permitting, etc.).

> > ..
> > > So at the moment I'm concentrating on the 3rd approach, but since I
> > > don't want the above list to grow into even more false trails, does
> > > anyone else have suggestions.  JWS may be number 4.
>
> Do you know if I can call JScript from the applet?

In a word - no.  Not unless you are talking about attaching
..RhinoScript or whatever it is/using 1.6 (which comes with it).

The applet does not actually appear in a web page, it appears
in the applet viewer - the only reason you need to specify a
home web page in the JNLP for an applet is for some of the
applet parameters (like size).

Here you can find two web-start examples of the same
(simple) program launched using JWS applet/application.
<http://www.physci.org/pc/>
That might give a better idea of what you can get with JWS.

> Yes JWS is rapidly becoming likely, better learn how it works then...

..the webstart for a app. that does not require a trusted
environment can be very simple.  Trusted apps. are a
different matter (what with code signing).

Andrew t.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.