D
Dmitriy.pindrik
I've read all I can about what imageObserver is and how to
implement/use it. After several hours of reading, I am still failing.
Here is a piece of my code - any help, pointer, or comments is
appreciated because as of right now, it's not fuctioning at all.
All that is supposed to happen is I want image map7bg.bmp to paint...
simple as that.
<code>
public class Engine extends Applet implements KeyListener,
ImageObserver
{
<--code omited-->
public void paint(Graphics g)
{
Image i = (Toolkit.getDefaultToolkit()).getImage
("C:/map7bg.bmp");
g.drawImage(i,1,1, this); //also tried null instead of null
}
public boolean imageUpdate(Image img, int infoflags, int x, int y,
int width,int height)
{
return false;
}
}
</code>
I added that imageUpdate method after reading about it online, seems I
need it for imageObserver to work.
Thanks in advance for any help,
Dima
implement/use it. After several hours of reading, I am still failing.
Here is a piece of my code - any help, pointer, or comments is
appreciated because as of right now, it's not fuctioning at all.
All that is supposed to happen is I want image map7bg.bmp to paint...
simple as that.
<code>
public class Engine extends Applet implements KeyListener,
ImageObserver
{
<--code omited-->
public void paint(Graphics g)
{
Image i = (Toolkit.getDefaultToolkit()).getImage
("C:/map7bg.bmp");
g.drawImage(i,1,1, this); //also tried null instead of null
}
public boolean imageUpdate(Image img, int infoflags, int x, int y,
int width,int height)
{
return false;
}
}
</code>
I added that imageUpdate method after reading about it online, seems I
need it for imageObserver to work.
Thanks in advance for any help,
Dima