For Programmers: Free Programming Magazines  


Home > Archive > Java Help > January 2008 > applet works, but stalls browser









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author applet works, but stalls browser
Daniel Jung

2008-01-19, 10:20 pm

Hi

I have a frame in a frameset (source code:
http://lingo.uib.no/daniel/source/applet.html) containing an applet
(source code: http://lingo.uib.no/daniel/source/java.html). The applet
makes a telnet connection to the server and receives cues from it in
order to refresh the other frames with the showDocument() command. This
works. But some browsers behave weirdly.

Opera (9.20 on XP) shows "Pictures: 1/2" in the address bar, the reload
button is red, and the mouse pointer get an hour glass beneath it - as
if a picture hasn't done loading. But the applet is completely loaded
(the system prints every action to the console, and it is always
complete). When pushing the (red) reload button (X), it turns blue
(curved arraw), and both the hour glass and the picture d/l notification
in the address bar stop. The applet and its functions are in no way
affected by this.

This doesn't happen all the time though. Normally, it appears upon
login. Sometimes when pages change and one does a reload of the whole
frameset, Opera may display the address bar, the mouse pinter and the
reload button lik eit is supposed to do. I haven't found out what is
causing the "malfunction", or the "wellbehaviour".

A user of mine reports this:

Twice today my status bar starting showing that it was constantly
connecting to and transferring data from vroma.org, even when I
wasn't doing a thing.

It happened first while I was using IE and the jumping was so bad
I had to quit (more like ten or more times a second). So I quit the
MOO and did something else. In fact, I restarted my computer. Then
I logged in with Mozilla and it was fine for a while, and then I
noticed the rapid-fire connecting and transferring data from
vroma.org; also on the upper toolbar the "Stop" icon kept flashing.

I think I have reason to believe that those behaviours are based on the
same problem. Opera is not "firing" insanely, and the applet works and
one may just push the reload button to get rid of the hour glass, the
focus however says where one wants to, and one may work as usual. In the
other browsers, users get so annoyed that they feel they have to quit. I
believe they are losing focus as well (technically, that is...)


Thanks for any insight, help or questions
- Daniel
Daniel Jung

2008-01-19, 10:20 pm

Hi

Sorry, I posted the wrong links; it should be the two files in

http://lingo.uib.no/daniel/source/


I am aware of the fact that the APPLET tag is deprecated. The pages are
all XHTML 1.0 Transitional, so it should work anyhow. And: I had too
tough a time trying to change it into OBJECT and serving all browsers
inclucing MSIE equally well while keeping nice and clean code.

Maybe I will have to give it a try again though. *shudder*

Thanks,
- Daniel
Roedy Green

2008-01-20, 4:33 am

On Sun, 20 Jan 2008 04:00:46 +0100, Daniel Jung <jung@uib.no> wrote,
quoted or indirectly quoted someone who said :

>I am aware of the fact that the APPLET tag is deprecated. The pages are
>all XHTML 1.0 Transitional, so it should work anyhow. And: I had too
>tough a time trying to change it into OBJECT and serving all browsers
>inclucing MSIE equally well while keeping nice and clean code.


that Object tag is so ugly I adamantly refuse to use it. Applet works
just fine.
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
Roedy Green

2008-01-20, 4:33 am

On Sun, 20 Jan 2008 04:00:46 +0100, Daniel Jung <jung@uib.no> wrote,
quoted or indirectly quoted someone who said :

>http://lingo.uib.no/daniel/source/


my first thought is any sort of socket connection should be done on
its own thread. Otherwise the GUI will freeze the whole time you are
connected. See http://mindprod.com/products1.html#SUBMITTER for
sample source code. also see http://mindprod.com/jgloss/jtable.html
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
Joshua Cranmer

2008-01-20, 7:21 pm

Daniel Jung wrote:
> I am aware of the fact that the APPLET tag is deprecated. The pages are
> all XHTML 1.0 Transitional, so it should work anyhow. And: I had too
> tough a time trying to change it into OBJECT and serving all browsers
> inclucing MSIE equally well while keeping nice and clean code.


<OT level="mild">
The problem here is an MSIE de facto implementation of the standards
that is wholly incompatible with the Firefox-Safari-Opera-etc. crowd.
The typical resolution is to nest two OBJECT tags, or, more commonly, an
EMBED within an OBJECT. Sun gives a "standards-compliant" example that
uses OBJECT and EMBED (the latter of which isn't even mentioned in W3C
HTML 4.01).
</OT>

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com