I have an applet like this
public class MainClass extends Applet
Board b = new Board()
public void paint(Graphics g)
inside this class i can use the methods getImage() and getDocumentBase() and getCodeBase
however inside my Board class (object) it looks like this
public class Board
public void draw(Graphics g)
g.drawString("this works graphics context ok",50,50);
img = getImage(getDocumentBase(),"image.gif");
now i know its not very wise to load the image in the paint/draw method this WONT be done when i get it working however the problem i have is in the board object i CANNOT reference getImage or getDocumentBase i have tried
(in MainClass getImage() and getDocumentBase() work fine)
and dont understand why the methods are not being passed down the inheritance. Any help would be muchly appreciated as this has left me STUMPED for many days now.
thank you in advance.