nella classe dove ho richiamato la finzione cioè Recognizer ho dichiarato sketchPanel in questo modo:
private SketchPanel SketchPanel;
questo sotto è l'inizio della classe Recognizer dove c'è la dichiarazione:
public class Recognizer {
private Vector bottomLeft;
private Vector topLeft;
private Vector bottomRight;
private Vector topRight;
private Vector bottom;
private Vector top;
private Vector bottomD;
private Vector topU;
private BufferedImage theSketch;
public Vector shapeList;
public Vector polyLineList;
private Vector edgeList;
private Vector theHSeqList;
//////dichiarazione di SketchPanel
private SketchPanel SketchPanel;
/////
private Graphics gr;
boolean prova[]=new boolean[3];
int temp=0;
int x1,y1,x2,y2;
int a= 10;
static final boolean PRINTS = false;
public Recognizer(BufferedImage theImage){
theSketch = theImage;
shapeList = new Vector();
polyLineList = new Vector();
edgeList = new Vector();
theHSeqList = new Vector();
pTableInit();
}//end constructor
.....etc.
....etc.