CIS 160 - Functional GUI

Objectives

  • Create graphical components
  • Use layout managers
  • Create and use event handlers
  • Create a functional GUI to do calculations

Program requirements

Create the GUI shown in the example. The program should add up the numbers in the text fields and display the total in a label when the "Add" button is clicked. The program should terminate when the "Exit" button is clicked. The program should also terminate when the "Close" button on the window frame is clicked. Your program should resemble the images in the example as closely as possible. (Note: the column of text fields is wider than the column of labels and the column of buttons. The columns are NOT all the same width.)

Examples

the GUI adding integers

the GUI adding floats (and a blank)

the GUI with an error

Rubric

  • 10 points for creating and adding all the required GUI components
  • 12 points for laying out the GUI components as shown in the examples
  • 15 points for having the event handlers working properly
  • 3 points for having proper documentation comments and following the coding conventions promoted in class