exception cannot call getImage() from Thread: AWT-EventQueue-1

I am pretty new to visad and currently exploring its usage for my applications. So far I was able to write some simple applications.

I have run into a problem when I tried to call a visad application through and applet's "submit" button on a web site as in the following format:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { Util.invoke(false,false, new Runnable() {
           public void run() {
           com.app.lt.CreateImage imagePr = new com.app.lt.CreateImage();
               try {
                   BufferedImage myImage =imagePr.plotImage();
               } catch (RemoteException ex) {
               } catch (VisADException ex) {

the exception I get is;

Exception in thread "AWT-EventQueue-1" visad.VisADError: cannot call getImage() from Thread: AWT-EventQueue-1
       at visad.DisplayImpl.getImage(DisplayImpl.java:2630)
       at visad.DisplayImpl.getImage(DisplayImpl.java:2614)
       at com.app.lt.CreateImage.plotImage(CreateImage.java:94)

where line 94 has the following code;
return display.getImage();

and display object is;
DisplayImplJ2D display = new DisplayImplJ2D(" ", 700, 500);

I looked through old e.mails and it seems like this works for everybody else. It works fine if I run the application by itself. Like I said I am a new user and there maybe much easier way to do this but I just don't know yet. any help is greatly appreciated... thanks in advance..

To unsubscribe visad, visit:

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