[Date Prev][Date Next][Index][Thread]
[SGT Mail Archive]
[SGT Main Page]
Re: Problem using SGT library / Java / ...
*************************************************
Message from the sgt mail list.
*************************************************
Damir,
You code looks fine. Except for , "ytitle.setHeightP(10);" the
height is in Physcial units not points. Your entire JPane is (5.0 x 3.0)
so a height of 10. is three times taller than the plot! I suggest starting
at a value closer to 0.15.
For the applet (remember you need jdk1.2 or newer!), the code
attribute shouldn't include the class designator code="ScalarPlot" . You
may need to download the applet plug-in converter tool from sun, called
HtmlConverter. It will translate your applet code to work with the plug-in.
The TAOMap demo reads a datafile from the jar. You should use the standard
java.io stream functionality.
If you want to have your data encrypted you should look at Sun's
JCE (Java Cryptography Extension). There are classes to help set up
client/server handshaking and encrypting the data. The problem I see is if
you really want security then you need a servlet running to encrypt the
data and handle the Public key handshaking.
There are no licensing issues with SGT. You can use JBuilder to
repackage just what you need into a new jar. (SE edition don't know if
personal edition will do it). You certainly don't need the demo, awt,
classes. You may want to unjar sgt then slowly remove files until it
doesn't work, add that one back, and keep going. A pain, JBuilder SE does
it automatically.
Hope this helps.
Don
At 09:37 AM 8/24/2002 +0100, Damir Dezeljin wrote:
>*************************************************
>Message from the sgt mail list.
>*************************************************
>
>Hi!
>
>I'm engaged to write a java applet/aplication using SGT to display a
>scalar plot of our mesurements. I'm using Borland J builder Personal
>edition form my development. I already wrote an Java program that show
>'demo' data. This program is functioning perfectly in JBuilder and I can
>even compile it with SUN JDK, but I can't than run it as standalone
>application nor as applet. Can someone help me pleas?
>
>My source can be downloaded from
>http://www.dezo.org/FileStore/ScalarPlot.java .
>
># I compiled the source with:
>javac ScalarPlot.java
># I don't know why I get 3 .class files from this file.
>
># Then I add all the sources to the SGT .jar archive with:
>jar -uvf sgt_v21.jar *.class
>
># Then I defined a default .class for the .jar archive:
>jar -uvmf mainClass.txt sgt_v21.jar
># mainClass.txt contains:
>Main-Class: ScalarPlot
>
># My HTML file contains:
><applet codebase="."
> code="ScalarPlot.class"
> archive="sgt_v21.jar"
> width=800 height=600>
></applet>
>
>When I try to start the file in IE the applet box display "Exception:
>java.lang.NoClassDefFoundError: gov/noaa/pmel/sgt/JPane" for a secunde or
>two and than nothing is working. I try to dubleclick the .jar file to
>start the default application, but this doesn't work too.
>
>Please help me.
>
>I have another question:
>Do I have to redistribuite the entire SGT .jar file on the internet so
>that my applet will work (I mean if there are any license issues)? <<
>because if I skip some files from the archive, I can strip down its size.
>
>And the last question. Has SGT library any class to facility parsing a
>file from the internet server (same location as .jar archive)? Is there
>any source example? I need it to get my hourly data which I want to
>display. Is there a way to transport those data encrypted or something
>similar so that a web visitior can't access the plain .txt file but he can
>only see the plot?
>
>Regards,
>Dezo
>
>PS: If posible, please send a CC of replay to my e-mail dezo@nib.si
>
>
>*************************************************
>To remove yourself from this mailing list,
>send mail to <Majordomo@epic.noaa.gov> with
>"unsubscribe sgt" in the message body.
==================================================
Donald W. Denbo dwd@pmel.noaa.gov
Ph: (206) 526-4487 Fax: (206) 526-6744
Collaborative tools: http://www.epic.noaa.gov/collab/
Netcdf Browser: http://www.epic.noaa.gov/java/ncBrowse
Scientific Java Graphics: http://www.epic.noaa.gov/java/sgt
EPIC Oceangraphic Data Management: http://www.pmel.noaa.gov/epic
==================================================
*************************************************
To remove yourself from this mailing list,
send mail to <Majordomo@epic.noaa.gov> with
"unsubscribe sgt" in the message body.