..
> i've written a small applet that runs next to the browser
What do you mean 'next to the browser'? Applets can only
appear in web pages, the applet viewer, or aplications that
can provide an AppletContext.
Do you mean that your applet appears in a web-page
that pops-up 'beside' the main web page?
>..and provides
> kind of a notepad-functionality (logging the webpages the user is
> visiting).
> whenever the user changes webpage, the applet is (of course
> )stopped/destroyed
It might not be..
>.. and then reinitialized.
> ..so far, so good;
..no, the applet is already in trouble, even if you don't depend
on pop-ups. While VM's are supposed to call the stop()/detroy()
methods, it is actually the browser that invokes that action.
Some browsers cannot be relied upon to invoke the
stop()/destroy() methods.
>..i've
> written the applet as singleton so that it preserves its data between
> the reloads.
>
> my problem is that the applet seems to temporarily "steal" the focus
> from the browser
Which one? It is a phenomenon of applet focus that
browsers either give focus to applets, or they do not.
Neither action is incorrect, since Sun never bothered to
specify what *should* happen to the focus if a focusable
applet is in a web-page.
> any idea how i could solve this problem ?
Redesign your site to not require ..
- applets for navigation,
- pop-ups,
- the browser to call stop()/destroy() for applets
- applets where focus matters (or alternately
'pages that rely on JS to control the focus').
Andrew T.