added the click listeneer that triggers nextPage
extracted the stroke color