Write down a GUI application which prompts user for a number between 1 and 5. Be sure to involve error checking so that program continues to prompt the user for a number till the user's entry is between 1 and 5, inclusive. Once a valid number is entered, program must display a grid of horizontal and vertical lines inside the frame. These lines must be drawn such that:
a) The lines create x number of horizontal and x number of vertical boxes, where x is the number entered by the user.
b) Each box should be 100 pixels by 100 pixels.
c) The grid is spaced inside frame such that it is perfectly centered both horizontally and vertically, with the 10 pixel border between edge of frame and the grid.