Presentation is loading. Please wait.

Presentation is loading. Please wait.

GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.

Similar presentations


Presentation on theme: "GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events."— Presentation transcript:

1 GUIs Graphical User Interfaces

2 Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events – Layout

3 AWT vs. swing AWT – Native operating system – Heavyweight Swing – Pure Java – Lightweight

4 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

5 GUI component 1 of 3 functions (at least) – Display information – Collect data from user – Allow user to initiate program functions


Download ppt "GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events."

Similar presentations


Ads by Google