Using Proxy and Chain of Responsibility (and almost Flyweight)

Write a program that has a GUI full of buttons. Let's make it a 15x15 square with 225 buttons. Each button will have a non-negative integer on it as label. You can generate consecutive integers starting at 0, up to 224. When the user clicks on a button (you can handle left-clicks only) the label (number) is sent to a chain of responsibility for handling. You can use the "incorrect" flyweight example that I showed in class as the GUI code you use/modify. Actually, the correct one will work as well here.

The chain will have 3 processors in it (in this order): a prime handler, an odd handler, and an even handler. It will be a basic chain, where once a processor decides it can handle the event (number/label), it does not pass the event further along the chain.

As mentioned above, the class example programs for flyweight, simpleServer, and netServer are there to use as coding guides for the patterns. You will have three processes running in the final product: the GUI with proxy chain, PP, and OP; you will use two sockets (via net proxies): one for PH to PP communications, and the other for OH to OP communications.