Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 8 Object Oriented Programming Using Java

Similar presentations


Presentation on theme: "Lecture 8 Object Oriented Programming Using Java"— Presentation transcript:

1 Lecture 8 Object Oriented Programming Using Java
By Rashid Ahmad Department of Computer Science University of Peshawar

2 Graphical User Interface
A graphical user interface presents a user friendly mechanism for interacting with a program. A GUI pronounced as (GOO-EE) gives a program a distinctive “look” and “feel”. Graphical User Interface

3 GUI Based Input/Output with JOptionPane

4 Introductory Concepts
Most swing components are written, manipulated and displayed completely in java. (so called pure java components). Swing components are part of java foundation classes (JFC)-java libraries for cross platform GUI development. Concept of AWT (Abstract Window Toolkit) and the concept of “look and feel” Concept of heavy weight and light weight components. Each heavy weight component has a peer that is responsible for the interations b/w the component and the local platform. Some swing components are heavyweight components, Such as subclass of (Java.awt.Window) e.g JFrame.

5 Hierarchy of GUI Classes
Class component declares the common attributes and behaviors of derived classes e.g. paint method Object Component A container manages a collection of related components Container JComponent JComponent is the super class Of most swing components. Declares The common attributes and behaviors of all subclasses

6 JComponent class This class declares the common attributes and behaviors of all subclasses of JCompoent. A pluggable look and feel Mnemonics Common event handling capabilities Tooltips Support for assistive technologies Support for user interface localization


Download ppt "Lecture 8 Object Oriented Programming Using Java"

Similar presentations


Ads by Google