Re: getImage exception

Hi Paul,

Your Exception is indeed caused by calling getImage() from
an event handler.  I doubt that using the invokeLater()
method from SwingUtilities will work.  Your event handler
needs to construct a 'new Thread' for this, as in the
captureDialog() method of visad.ss.FancySSCell (at about
line 700).  Note this method calls BasicSSCell.captureImage()
which in turn calls DisplayImpl.getImage() and then uses
the image to build a JPEG file.  Your code would probably
do something different after the getImage() call.

I have asked Curtis to upload a new visad.jar longer than
3k.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


On Tue, 10 Oct 2000, Paul Gifford wrote:

> 
> Hello again,
> 
>   Here's my latest exception:
> 
> visad.VisADError: cannot call getImage() from Thread: AWT-EventQueue-0
>         at visad.DisplayImpl.getImage(DisplayImpl.java:1624)
> 
> 
>   Any thoughts?  I don't get the exception when I run Test50, but I
> don't see what it is I'm doing differently.  A call to getImage() seems
> pretty straightforward!
> 
> Thanks,
> 
> p
> 
> 
> 
> ------------------------
> Paul Gifford, Capt, USAF
> NOAA/NGDC
> 325 S Broadway EGC2
> Boulder CO 80303
> 
> 303-497-6556 voice
> 303-497-6513 fax
> 


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