sto programmando in java, comunque ho inserito

SketchPanel SketchPanel = new SketchPanel ();

ma mi da un'eccezione nel main

Exception in thread "main" java.lang.OutOfMemoryError