No keyboard input in JApplet

T

tetsuoni

I have observed a consistent problem with applets not accepting
keyboard input. This manifests itself when I put a JTextArea into a
JInternalFrame in an applet. The applet will work perfectly with
appletviewer, but when it is brought up in any of the Mozilla-based
web-browsers --- Firefox (Linux), Epiphany (Linux), Mozilla (Linux) ---
the applet fails to process any keyboard inputs. :(

I have seen this occur when I visit some websites that try to run a
Java-based chat program --- and it certainly is happening in my
Applets.

How are others making this work with JApplets?

I am running Firefox (Linux), Epiphany (Linux), Mozilla (Linux).

Note: Mouse events are working... it is just the keyboard events that
are failing. Even selecting text inside of the JTextArea with the
mouse will work, but typing will not.

Any ideas?

I've tried using requestFocus() and similar methods, but nothing works.
How are people writing applets that get keyboard input and work under
Linux?

The solution MUST be coded as an applet in the page with no popup
windows or dialogs. WebStart is not an option. Downgrading to Java
1.4 is not an option as the applets are expected to be used by a large
audience using their own computers... it needs to work with the current
Java 1.5 and current Firefox/Mozilla browsers.
 
D

Daniel Pitts

I have observed a consistent problem with applets not accepting
keyboard input. This manifests itself when I put a JTextArea into a
JInternalFrame in an applet. The applet will work perfectly with
appletviewer, but when it is brought up in any of the Mozilla-based
web-browsers --- Firefox (Linux), Epiphany (Linux), Mozilla (Linux) ---
the applet fails to process any keyboard inputs. :(

I have seen this occur when I visit some websites that try to run a
Java-based chat program --- and it certainly is happening in my
Applets.

How are others making this work with JApplets?

I am running Firefox (Linux), Epiphany (Linux), Mozilla (Linux).

Note: Mouse events are working... it is just the keyboard events that
are failing. Even selecting text inside of the JTextArea with the
mouse will work, but typing will not.

Any ideas?

I've tried using requestFocus() and similar methods, but nothing works.
How are people writing applets that get keyboard input and work under
Linux?

The solution MUST be coded as an applet in the page with no popup
windows or dialogs. WebStart is not an option. Downgrading to Java
1.4 is not an option as the applets are expected to be used by a large
audience using their own computers... it needs to work with the current
Java 1.5 and current Firefox/Mozilla browsers.

This might be an issue somewhere other than the applet itself. Maybe
you should give us an sscce (http://www.physci.org/codes/sscce/) so
that we may see the problem first hand.
 
A

Andrew Thompson

I have observed a consistent problem ...

I have observed a consistent pattern of posts from
you that suggests you abandon any thread on which
you are not hearing what you want to hear..

Care to comment? Or can we expect a *new* thread?

Andrew T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top