private Graphics g ;

is not initialized. And however, keeping a Graphics like this variabile not necessarily is a good thing (depending on what Graphics you intend).