Hi, i'm trying to make a program to display mandelbrot and julia set, i already have the methods to determine weather a point is in the set or not for both, the problem comes when trying to display, my code is this:
My output is as follows :
java.lang.NullPointerException
at Fractales.juliabrot.dibujar(juliabrot.java:146)
at Fractales.juliabrot.calcular(juliabrot.java:110)
at Fractales.juliabrot.<init>(juliabrot.java:25)
at Fractales.Visualizacion.init(Visualizacion.java:25)
at sun.applet.AppletPanel.run(AppletPanel.java:425)
at java.lang.Thread.run(Thread.java:619)
i don't understand why i'm getting null on g, since thats the only reason of why i get npe(well, i don't really understand
java very well)
If someone could help me a bit, i'd be really gratefull, thanks in advance.
BTW class visualizacion is only a Japplet that adds the jpanel, this code is not the best around, not even near, but the problem is not in visualizacion, is in where to call getgraphics, or something like that.