Re: PlotDigits extends Applet :-(

Hi Bill,

I played around with it, but also could not get it working
as an applet in the visad/examples folder. Unfortunately,
the fact that visad/examples is supposed to be the default
package makes things like this difficult.

I have converted the TestPlotDigits example to use Swing
instead of functioning as an applet (there was no reason the
test needed to be an applet). I put the updated test program
on demedici at ~curtis/

I removed the package statement so that it works in the
visad/examples directory. Parameters that used to be
specified in the HTML file can now be given on the command
line instead. So visad/plotdigits.html is obsolete now.


At 01:35 PM 7/27/2004, Bill Hibbard wrote:
>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]

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