Re: NullpointerException

Hi Mike,

I'm pretty sure that the cause of your problem is the
lack of a call to addMap.  You can fix it by inserting
a call to addMap as follows:

  Scalarmap scm = new Scalarmap(x, Display.SelectValue);
  VisADSlider vslider = new VisADSlider(scm, 0.0f, 1.0f);

I have added a check for this inside of VisADSlider to
give a better error message.

Please let me know if the addMap call does not solve your

By the way, you can better error messages by running under
jdb, as in:

  jdb myclass
  > run myclass

When you get an Exception, what we really like to see is
a stack trace from jdb that includes line numbers.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

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