Owl Sams Teach Yourself Java 2 in 24 Hours

Hour 24: Making Your Knowledge Add Up


  • The graphical user interface for the author's version of MiniCalc is shown below:

    This interface consists of 26 components: 18 JButton components, 1 JTextField component, and 7 JPanel components. One of the JPanel components is used just to take up space between the clear key ("C") and the equals key. The other six are used as containers to hold all of the components on a horizontal row. The first of these JPanel containers is used for the text field at the top, the second contains the "7", "8", "9", and "/" keys, and so on.

  • If you have questions about the process of developing a graphical user interface for the calculator, be sure to contact the author.


  • None