w funkcji main:
Tablecik tab = new Tablecik(demo);
w konstruktorze klasy Tablecik:
this.demo = demo;
this.linie = new Lines(this.demo);
w konstruktorze klasy Lines
this.demo = demo;
ActionListener bl2 = new ActionListener() // rysoowanie linii z antialiasingiem
{
public void actionPerformed(ActionEvent e)
{
try{
int x0 = Integer.parseInt(xx0.getText());
int x1 = Integer.parseInt(xx1.getText());
int y0 = Integer.parseInt(yy0.getText());
int y1 = Integer.parseInt(yy1.getText());
this.demo.gp.drawAntialiasedLine(x0,y0,x1,y1,Color.BLACK);
System.out.println("BBB");
}
catch(NumberFormatException ex){
System.out.println("podany zly format liczby Linia antialiased");
}
}
};
o i blad przy kompilacji : cannot find symbol
symbol: variable demo
nie wiem o co kaman, bo przekazalem konstruktorowi referencje do dema tworzonego w mainie i przetrzymuje ta referencje jako pole klasy.
jedyne wytlumaczenie dla mnie to takie ze klasy wewnetrzne nie widza pol klas zewnetrznych ale to by bylo dziwne. czy ktos jest w stanie mi cos doradzic/pomoc.