double buffer

painted added double buffer method. no more flickering. for now