Mira is the name of a program that measures and improves the image quality of the Keck Telescopes by correcting misalignments of the secondary mirror and adjusting the segments of the primary mirror. It is used regularly to achieve optimal focus calibration. Mira is completely written in Java. During the design phase, several software design patterns were followed resulting in short implementation times and a robust product. In this paper, we first discuss the operation of Mira, and then we present four examples of design patterns, describing the problem, the solution and the implementation.