40 likes | 147 Views
Graphical user interfaces. Chapter 17. Some GUI already used in text. scrollbars, labels, textfields, buttons New Ones: Checkboxes, group checkboxes (radio buttons), choiceboxes (drow down lists), textboxes, canvasses, panels, layout managers. For each GUI component:. The implements class
E N D
Graphical user interfaces Chapter 17
Some GUI already used in text • scrollbars, labels, textfields, buttons • New Ones: • Checkboxes, group checkboxes (radio buttons), choiceboxes (drow down lists), textboxes, canvasses, panels, layout managers
For each GUI component: • The implements class • Declaration and initialization • Registration • The event handling • See Demo program in chapter for various GUI (checkboxes, checkbox groups) • Note method …public void itemStateChanged(ItemEvent e) {
Make use of the item chosen by the program user • Choiceboxes (drop down lists) • Again see program Demo similar to menus (not allowed with applets) • Text areas: text in a window that has scrollbars left/right and up/down as needed • Canvasses – See program CanvasDemo • Panels • Layout Managers Flow layout managers