Where is the graphics package on www.acme.com?

I can't find it anywhere, at least not something that generates chart
graphics from data.


Greg Dunn



-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Andy Cobley
Sent: Tuesday, April 02, 2002 2:48 AM
To: [EMAIL PROTECTED]
Subject: Re: How to draw graphs in JSP


You need to use a graphics package such as the one form Acme.

www.acme.com

Once you've imported the package into your code then the jsp code (in a bean
or whatever) is simply:

Frame frame = null;
Graphics g = null;
 try{
  frame = new Frame();
  frame.addNotify();
 Image image = frame.createImage(400, 60);
g = image.getGraphics();
}
g.setColor(Color.red);
drawLines(g,40,100);
Filestream= new FileOutputStream("c:\\wwwroot\myPicture.gif");
Outputstream= new DataOutputStream(Filestream);
GifEncoder encoder =null;
try {
encoder = new GifEncoder(image, Outputstream);
 }catch(Exception iox){ return;        }
try{
        encoder.encode();
 }catch(Exception iox){return}
// Clean up here, close stream and dispose of frame etc

finally {
        // Clean up resources
  if (g != null) g.dispose();
  if (frame != null) frame.removeNotify();
        System.out.println("Finished all drawing");
}



Andy


> -----Original Message-----
> From: Murali Mohan [mailto:[EMAIL PROTECTED]]
> Sent: 02 April 2002 09:43
> To: [EMAIL PROTECTED]
> Subject: How to draw graphs in JSP
>
> Hi,
>
> Any one have idea.....
> How to draw graphs in JSP?
>
> thanks
> Murali
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-
> INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to