GUIs Graphical User Interfaces
Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events – Layout
AWT vs. swing AWT – Native operating system – Heavyweight Swing – Pure Java – Lightweight
Inheriting from JFrame(swing) JFrame: A window with title bar and border Responsibilities of subclass constructor: Call super constructor Get reference to content pane Set layout manager Instantiate components Add components to content pane Set window size Display window
GUI component 1 of 3 functions (at least) – Display information – Collect data from user – Allow user to initiate program functions