Hi all,
I wrote a small text editor (using a JTextPane) in order to ease the use
of a CMS, in a more WYSIWYG way. Basically, you can see directly the
effect of setting the background color, the text color,
bold/italic/underlined styles and so on... You can have several applet on
one page as there is one applet per column and per language.
As it's used in a CMS, it uses liveconnect (javascript interaction)
massively to get the default values of the styles and the content text
from the HTML page.
The problem is that on first page load, the applet doesn't initialize
correctly: the background color is not always loaded correctly, neither
are the text color or style. It can happen that the text of one applet is
duplicated in another. It even happens that in place of the content text,
I find the value of the text color (ie. #777777), the value of the text
alignment or whatever.
Note the this problem occurs under IE exclusively and fades away on page
reload. Firefox, Opera and Konqueror work just fine.
So at first sight, the problem is due to a bad page loading in IE, so I
placed several sleep() in the init() method: one before each style
initialization.
Sadly, it doesn't seem to have any effect.
Does anyone here already encoutered this problem ?
Thanks in advance for your help.

Signature
Alexandre
Computers are like air conditioners
They don't work when you open windows
Andrew Thompson - 23 May 2005 16:58 GMT
> So at first sight, the problem is due to a bad page loading in IE, so I
> placed several sleep() in the init() method: one before each style
> initialization.
> Sadly, it doesn't seem to have any effect.
Though I have considerable experience with Applets, and some with JS,
I am not too familiar with the JS->Java LiveConnect stuff.
Having said that, I suspect you are better off asking the JS people
for a JS solution, since it sounds as though the IE DOM is taking longer
to build (or the applet less time to launch) - and they will probably
have some good ideas on how to detect the completion of the process.
HTH

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Alexandre Lahure - 23 May 2005 17:06 GMT
>> So at first sight, the problem is due to a bad page loading in IE, so I
>> placed several sleep() in the init() method: one before each style
[quoted text clipped - 8 lines]
> to build (or the applet less time to launch) - and they will probably
> have some good ideas on how to detect the completion of the process.
OK, I'll post there too

Signature
Alexandre
Computers are like air conditioners
They don't work when you open windows