1st optimization to ButtonFrame.
Use inner class to further optimize ButtonFrame.