Lecture 8 Object Oriented Programming Using Java

Slides:



Advertisements
Similar presentations
Chapter 18 Building the user interface. This chapter discusses n Javas graphical user interface. n Swing: an enhancement of a library called the Abstract.
Advertisements

Introduction to Java 2 Programming
Java Software Development Paradigm Lecture # 12. Basics of GUI.
JAVA API (GUI) Subject:T0934 / Multimedia Programming Foundation Session:1 Tahun:2009 Versi:1/0.
User Interface Design CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Unit 091 Introduction to GUI Programming Introduction to User Interfaces Introduction to GUI Programming GUI Design Issues GUI Programming Issues Java.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
1 Chapter 7 Graphics and Event Handling. 2 Overview The java.awt and javax.swing packages and their subpackages support graphics and event handling. Many.
Introduction to GUI Programming
JFC and the Swing Package Feb 10, Java Foundation Class (JFC) zAWT (Abstract Window Toolkit) has been used since jdk1.0 Archaic and very poorly.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
GUI Programming in Java Tim McKenna GUI Programming Concepts l conventional programming: sequence of operations is determined by the program.
Graphic User Interfaces Part 1. Typical GUI Screen from Microsoft Word What GUI “components” can you see? –Menus? Buttons? Labels? What else? –Anything.
Introduction to Java Swing “We are the sultans of swing” – Mark Knopfler.
GUI Programming in Java
Swing part-one Eriq Muhammad Adams J
Software Construction Lecture 10 Frameworks
Java Swing, Events and MVC Optional Readings: Eckel’s Thinking in Java: Chap 14 (
CS377A: A Programming Approach to HCI Jan Borchers Spring Swing Refresher David Merrill 5/14/2002
Object Oriented Programming Ders 11: Interfaces Mustafa Emre İlal
Java Applets. 2 Introduction to Java Applet Programs  Applications are stand alone programs executed with Java interpreter executed with Java interpreter.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Introduction to Applets Course Lecture Slides 29 th July 2010.
Objectives of This Session
Dale Roberts GUI Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
Session 27 Swing vs. AWT. AWT (Abstract Window ToolKit) It is a portable GUI library for stand-alone applications and/or applets. The Abstract Window.
School of Computer Science & Information Technology G6DICP - Lecture 17 GUI (Graphical User Interface) Programming.
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
 2002 Prentice Hall, Inc. All rights reserved Introduction Graphical User Interface (GUI) –Gives program distinctive “look” and “feel” –Provides.
1 CSC111H Graphical User Interfaces (GUIs) Introduction GUIs in Java Understanding Events A Simple Application The Containment Hierarchy Layout Managers.
– Advanced Programming P ROGRAMMING IN Lecture 21 Introduction to Swing.
Java Graphics Stuart Hansen 11/6/03. What’s Wrong with OpenGL Graphics – not GUI –No real support of text boxes, buttons, etc. Procedural - not OOP –No.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
CS Lecture 00 Swing overview and introduction Lynda Thomas
SWING 101. IF YOU GET LOST - IMPORTANT LINKS  Swing articles:
Cs413_chapt02.ppt CS413 Advanced Swing Graphical User Interface Components Text: Advanced Java 2 Platform: Chapter 2 Abstract Windowing Toolkit (AWT) Library.
Applets Yong Choi School of Business CSU, Bakersfield.
CS Fall 2012, Lab 09 Haohan Zhu. Boston University Slideshow Title Goes Here CS Fall 2012, Lab /20/2015 GUI - Graphical User Interface.
Creating Windows. How can we use Java to create programs that use windows (GUI applications)? How can we use Java to create programs that use windows.
 GUI – Graphic User Interface  Up to now in the programs we have written all output has been sent to the standard output device i.e.: the DOS console.
GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.
Swing. Introduction to Swing What is Swing? “ Swing is a diverse collection of lightweight components that can be used to build sophisticated user interfaces.”
5-Jan-16 R Ramesh Swing. 5-Jan-16 R Ramesh An Introduction to Java Foundation Classes (JFC) A suite of libraries to assist programmers create enterprise.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
SE-1020 Dr. Mark L. Hornick 1 Graphical User Interfaces.
Java Swing, Events Readings: Just Java 2: Chap 19 & 21, or Eckel’s Thinking in Java: Chap 14 Slide credits to CMPUT 301, Department of Computing Science.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
Introduction to Swing Mr. Crone. What is Swing? a collection of pre-made Java classes used to create a modern graphical user interface.
Introduction to Swing Mr. Crone. What is Swing? a collection of pre-made Java classes used to create a modern graphical user interface.
Dale Roberts GUI Programming using Java - Windowing Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
Lecture 6 Object Oriented Programming Using Java By Rashid Ahmad Department of Computer Science University of Peshawar.
A Quick Java Swing Tutorial
Lecture 15 Basic GUI programming
Welcome To java
Provision for GUIs in Java
Java Look-and-Feel Design Guidelines
Provision for GUIs in Java
Lecture 27 Creating Custom GUIs
Swing & the JFC – Advanced Java GUI
Event Driven Programming and Graphical User Interface
GUIS: Graphical User Interfaces
Building Graphical User Interface with Swing a short introduction
Java Applets.
Graphical User Interfaces in Java Event-driven programming
Week 8 Swing NetBeans GUI Builder
Advanced Programming in Java
Graphics and FLTK CSCE 121 J. Michael Moore
SE-1021 Software Development 2
Graphical User Interface
Presentation transcript:

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

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

GUI Based Input/Output with JOptionPane

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.

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

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