Re: Intermittent lack of display in applet

Tom:

The only thing I've seen like this was not with VisAD or 3D.  The problem
turned out to be that I needed to override the applet's start() and stop()
methods to be sure that when the applet was stopped (when you hit "reload" in
the browser, it is supposed to call stop() first), you suspend yourself to
prepare for when start() is called.  [In my case, I had to stop/remove my
threads in stop(), and then in start() had to start them up again...along with
forcing a re-display of the canvas I was using.]

If you're not doing it, you might simply try to override start() and do
something to force the redisplay of everything (I think there is a
reDisplayAll() method in DisplayImpl).

I think the cleanest thing, though, would be to have stop() close the Display
and the JFrame, and have start() create the JFrame and redo the display.

tom


Tom Anderl wrote:
> 
> I've got a project that downloads a bunch of data from a server and
> displays it in a JFrame that is created by an applet.  Sometimes, after
> re-loading the applet and re-downloading the data, VisAD will not display
> the data.  I get the axes in the 3-d view, and I can move them around with
> the mouse, however, one of the axes doesn't have tick marks on it.  In the
> 2-d view, neither axis has tic marks.  And neither view has data.
> Additionally, I've got a color legend that contains hard-coded values that
> also fails to display itself.
> 
> On a good day, this only happens about 1 out of 8 re-loads, but on a bad
> day, every other re-load will turn out this way.  This never happens the
> first time after starting the browser however, and a work-around I've
> found is to just re start the browser each time I want to re-load.
> 
> One more thing to add, after a failed display, if I re-load the data and
> re-display it, it works.
> 
> Any ideas what's going on here?
> 
> Thanks,
> 
> Tom

-- 
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Phone/VoiceMail: 608/262-2759
Fax: 608/262-5974


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: