You can definitely render a chart from within a Java applet. I do not
have an exact example for you, but here is some Java Swing code that
does something similar:

private static void displayUrlString(final String urlString) throws
IOException{
        JFrame frame = new JFrame();
        JLabel label = new JLabel(new ImageIcon(ImageIO.read(new URL
(urlString))));
        frame.getContentPane().add(label, BorderLayout.CENTER);
        frame.pack();
        frame.setVisible(true);
    }

You will have do something equivalent for a Java applet / AWT.

-Julien
http://charts4j.googlecode.com

On Feb 16, 11:21 am, pilotwithoutaplane <[email protected]> wrote:
> I tried a couple of things in a Java applet both of which threw a
> SocketsPermission exception.
> My online Java applets uses  <img> tag in my About Dialog box to
> display my image which is stored on one of my sites. The image gets
> rendered. So I thought since the <img> tag uses a url in src
> attribute, I may be able to call charts api url to get a chart
> displayed in my applet. This threw an exception.
> Another thing I tried was to use getImage(url) method within the body
> of the code to use charts api. This too threw an Exception. I think it
> said something like SocketsPermission error
>
> Are we not allowed to call the Api from outside a web page?
>
> Asad
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to