Created a subclass of Grid to overide paint method