Let a JScrollPane handle it for you. ...
....
public class EssaiAscenseur6 extends JApplet {
Later, from the OP.
"...Currently KeyListener don't running with
Firefox3 into my JSCROLLPANE ..."
If you mean JScrollPane then please don't SHOUT at us.
If you mean a custom class, then toss it away
as the author did not even know enough to give
it a name that sounds like an implemented class,
so much as an interface.
I just tested the code I posted in FF3
"Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"
The applet code I posted receives input focus and
key events if it is the only focusable element in
the web page. If it it /not/ the only focusable
element, the other focusable element gets the focus
and the applet does not get input focus until the
user clicks on it with the mouse.
A focusable element in a web page might be anything
from a form based text field or button, to a link.
This is a problem typical of applets. Either the
applet(s) gets focus and the other elements miss out,
or the other elements get focus and the applet misses
out. Note that there is usually no way, using *just*
the keyboard, to navigate between them. I have seen
this behavior in both IE and Moz. based browsers.
To ensure the applet does get focus, always and
without fail, launch it using webstart.
And as an aside, you might get a lot better help
if you can post a web page with an example of the
applet, as well as a web page that links to the
current code. Applets are hard to get working
correctly, and an example makes them a lot easier
to debug, or at least get test results.