CS 101 Lecture 11 - User Interface Components and Events II

Class Examples:

    Today we did several modifications of our drawing program from last week. Here are several different versions:

  1. This version adds a ComboBox for the selection of shape:

    Click on ComboBoxDrawing to show the example.

  2. This modification has one Combobox for shape selection and another for color selection.

    Click on DoubleComboBoxDrawing to show the example.

  3. A slight improvement with the initial color set according to the color menu.

    Click on ColorfulDoubleComboBoxDrawing to show the example.

  4. This version puts the two pull-down menus into a panel.

    Click on PanelComboBoxDrawing to show the example.

  5. Let's use buttons instead of a pull-down menu for choosing the shape.

    Click on BadButtonPanelDrawing to show the example.

  6. An improved version using a GridLayout for the bottom panel.

    Click on ButtonPanelDrawing to show the example.