Hi. I'm trying draw on a panel inside a frame. But all the time I get 2Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" in the repaintComponent.
This is all the exception error.
and keeps repeating all the time.
the code is the below
I'm trying to implement the langton's ant problem on java. Inside ant.render(g) is jus the follow code
My idea is on repaintcomponent paint the world an the ant positions. But I can't get this work. Any solution? thanks!