- Forward


GUI Components
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

What is a GUI Component?
Back SMYC Forward
  • To a User:
    • A View (in the M-V-C)
  • To a Developer:
    • A Model
    • A Controller
Abstract Components
Back SMYC Forward
  • Model:
    • N/A
  • View:
    • Colors, fonts, ...
  • Controller:
    • hasFocus, isEnabled, ...
Buttons
Back SMYC Forward
  • Model:
    • Labels, icons
  • View:
    • button_windows
    • button_motif
    • button_java
  • Controller:
    • MouseDown, MouseUp
    • MouseOver, MouseOut, KeyPressed
Checkboxes/Radiobuttons
Back SMYC Forward
  • Model:
    • Labels, icons, isSelected
  • View:
    • radiobutton_windows
    • radiobutton_motif
    • radiobutton_java
  • Controller:
    • MouseClick
Listboxes/Comboboxes
Back SMYC Forward
  • Model:
    • Alternatives, selectedItems
  • View:
    • combobox_windows
    • combobox_motif
    • combobox_java
  • Controller:
    • MouseClick, KeyPressed
Sliders
Back SMYC Forward
  • Model:
    • lowerBound, upperBound, value
  • View:
    • slider_windows
    • slider_motif
    • slider_java
  • Controller:
    • MouseDrag
Scrollbars
Back SMYC Forward
  • Model:
    • Same as for sliders
  • View:
    • scrollbar_windows
    • scrollbar_motif
    • scrollbar_java
  • Controller:
    • MouseDrag, MouseClick
Textfields/TextAreas
Back SMYC Forward
  • Model:
    • See the discussion of the M-V-C
  • View:
    • See the discussion of the M-V-C
  • Controller:
    • See the discussion of the M-V-C
There's Always More to Learn
Back -