> Hello,
> I am having a problem displaying images on an applet,
URL?
>...either in a
> jlabel or in a jbutton.
Are you referring to JLabel/JButton?
Please use correct capitalisation to assist the reader.
>..Every time I run the applet I get an error
> message saying "applet not initialized". This is what I am currently
[quoted text clipped - 5 lines]
>
> "http://www.google.com/intl/en/images/logo.gif");
Is your page at Google?
> image = ImageIO.read(url);
>
> }
> catch (IOException err) {}
This is rather silly. Try instead
catch(IOException ioe) {
ioe.printStackTrace();
}
> I have tried many different things in the try block but none of them
> worked.
Try looking at the errors reported in the console.
>.. Does anyone know why this is happening? I am new to using
> images on an applet and don't know how to correct this, the only thing
> that I could think of is if I loaded the applet in on my site
At least on a site other people can see it fail..

Signature
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
> Image image = null;
> try {
[quoted text clipped - 5 lines]
> }
> catch (IOException err) {}
from Applet you can't connect to other server

Signature
Andrey Kuznetsov
http://uio.imagero.com Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities
Andrew Thompson - 07 Jan 2006 12:39 GMT
>>Image image = null;
>> try {
>> URL url = new URL(getDocumentBase(),
..
> from Applet you can't connect to other server
Sure you can, if the applet is signed and trusted! ;-)
But then, Google has a habit of 'not permitting access'*
to Java applications and may take similar measures against
Java Applets.
That is why I think console is best. One step at a time.
* Except of course, through their publicly accessible API.

Signature
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
Tail_Spin - 08 Jan 2006 00:02 GMT
I just wrote a java ticker applet that goes back to the server it was
downloaded from
and reads a data file that PHP updates on the server from some third party
HTML
files. And no signing or special security measures!
http://www.freesimracing.com/
So ya, you can connect to the server the applet lives on without much
effort, ... however,
tring to read from somewhere else takes a lot more work.
> > Image image = null;
> > try {
[quoted text clipped - 13 lines]
> http://reader.imagero.com Java image reader
> http://jgui.imagero.com Java GUI components and utilities
>"http://www.google.com/intl/en/images/logo.gif");
First of all you need permission from Google to do that. You could
store the image in you jar.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.