add double buffer to avoid flicker but taking not much effect.
trying to make my own PaintPanel.