Yuet Sim Lee wrote:
> Hi,
>
> I knew that getImage() could
> load an image file from the
> network and paint() could
> display it.
>
> However, I don't know how can I
> get an image which is a local
> file. I tried
>
> Image i = getImage( String filename )
>
> It can not be compiled and the
> co
Make sure you are using the getImage() from the Toolkit class and not the Applet
class. The Applet class only supports getImage() for a URL. I couple things to
try:
i = getToolkit().getImage( "houses.gif" );
-- or --
i = getImage( new URL( "file:////houses.gif" ));
Andy
Yuet Sim Lee wrot
--- Yuet Sim Lee <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I knew that getImage() could
> load an image file from the
> network and paint() could
> display it.
>
> However, I don't know how can I
> get an image which is a local
> file. I tried
>
> Image i = getImage( String filename )
>
> It can n
Hi,
I knew that getImage() could
load an image file from the
network and paint() could
display it.
However, I don't know how can I
get an image which is a local
file. I tried
Image i = getImage( String filename )
It can not be compiled and the
compiler said:
Incompatible type for method. Ca