Implemented BufferedGraphicsContext for the Paint events

Signed-off-by: Johan Fredriksson <johanfredriksson1987@gmail.com>