display something several times

Hello VisAD experts,

here is a question you might be able to answer a VisAD novice:

I got quickly VisAD to run in my own Java application. Currently a new frame is opened with a DisplayImpl object added. This object contains a simple drawing taken from the very first tutorial example. So it's basically this example that is started within my program by click on a button. What I'm wondering about is if I do this simply twice (open the window with the DisplayImpl object (here it works), close it and open it again) then I'm getting a null pointer exception and the error message

"ScalarType: name already used"

I guess that although the frame object has been completely renewed by closing and opening the window again there is somehow something left in the memory that lets the program think that the objects/variables created the first time still exist. Is this the case? And how do I fix this, i.e. is there a "clear" method or anything like that?

My goal was to have more than one plots in the same window. Maybe there is sample code for that somewhere but I couldn't find it. Can you guys help me??

Thanks a lot,

Andre
--
Dipl.-Inform. Andre Skusa (PhD student)

NRW Graduate School in Bioinformatics and Genome Research
Center of Biotechnology (CeBiTec)
University of Bielefeld
Postfach 10 01 31
D-33501 Bielefeld
Germany

home: http://www.cebitec.uni-bielefeld.de/~askusa

email: andre.skusa@xxxxxxxxxxxxxxxxxxxxxxxx


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