Write a graphical program that shows a set of overlapping rectangular regions, each in a different random color. The regions are represented internally as a linked list. The regions have a “z-ordering” in which rectangles closer to the end of the list are closer to the top, closer to the user’s field of view. When the user clicks the mouse, the topmost region that touches the mouse pointer moves to the very top (end) of the linked list. For example, the following diagrams show the top-left rectangle before and after the mouse is clicked:

(See the Nifty Assignments page at http://nifty.stanford.edu for a more detailed description of this project, as written by its original author, Prof. Michael Clancy of the University of California, Berkeley.)
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.