Re: PlotDigits extends Applet :-(

Hi James,

This sounds like a good idea. I was able to get all the
Applet stuff out of visad/ into
visad/, but I cannot figure out how to
change visad/plotdigits.html so the test still works.
Ideally would go into the visad/examples
directory, but there would have to have
no package statement and I don't know if the Applet can be
made to work with that.

I've put my new and in:

Can any Applet experts help?


On Tue, 27 Jul 2004, James Kelly wrote:

> Hi All,
> I've been experimenting with generating graphics without an X display.
> This means I could create images either as background tasks (from cron)
> or from within a Java Server Page or servlet.
> To do this, I start java with the "-Djava.awt.headless=true" option, or
> use System.SetProperty("*java*.*awt*.*headless*","true") in the code.
> So far I've been able to generate a simple graphic from a jsp (using a
> modified version of Ugo's I can also retrieve data from an
> ADDE server and plot it as text, save it as an image and embed it in a
> web page on the fly. Then I tried contouring the data. This produces the
> exception:
> java.awt.HeadlessException
>         at java.applet.Applet.<init>(
>         at visad.PlotDigits.<init>(
>         at visad.Contour2D.contour(
> So Contour2D calls PlotDigits and PlotDigits extends Applet, which isn't
> supported in headless mode. Looking at the code for PlotDigits, the
> JavaDoc says:
> "It is implemented as an applet so that it can be
>    tested graphically with the appletviewer utility."
> Can this dependency be removed?
> Cheers,
> James
> [this is a resend... earlier message to visad@xxxxxxxxxxxxxxxx didn't
> seem to work]