GUI Programming Joseph Sant Sheridan College. Agenda Elements of GUI programming Component-Based Programming. Event-Based Programming. A process using.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

AA high level programming language. IIt is created by Microsoft. UUses a graphical environment called the Integrated Development Environment (IDE).
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
Forms and Screen Design What is a form? A layout on screen which allows users to make choices, enter data or view data. They are found in: PC applications.
Lecture 15 Graphical User Interfaces (GUI’s). Objectives Provide a general set of concepts for GUI’s Layout manager GUI components GUI Design Guidelines.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Chapter Day 10. © 2007 Pearson Addison-Wesley. All rights reserved4-2 Agenda Day 10 Questions from last Class?? Problem set 2 posted  10 programs from.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CS 112 GUI 06 May 2008 Bilkent. Java GUI API Containers: ◦ contain other GUI components. E.g, Window, Panel, Applet, Frame Dialog. Components: ◦ Buttons,
Alice 2.0 Introduction to Event-Driven Programming Mr. Planck.
GUI Programming in Java Tim McKenna GUI Programming Concepts l conventional programming: sequence of operations is determined by the program.
Slide 1 Chapter 2 Visual Basic Interface. Slide 2 Chapter 2 Windows GUI  A GUI is a graphical user interface.  The interface is what appears on the.
Visual Basic Chapter 1 Mr. Wangler.
Unit 20: Event Driven Programming
Event-driven Programming
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Welcome to CIS 083 ! Events CIS 068.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Event Driven Programming
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 14 Event-Driven Programming.
Ch 3-4: GUI Basics Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Coming up: GUI Components.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
DB Implementation: MS Access Forms. MS Access Forms  Purpose Data entry, editing, & viewing data in tables Forms are user-friendlier to end-users than.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Interactive Programs Java API. Terminology Event—an action or occurrence, not part of a program, detected by the program. Events can be Event—an action.
Practical Programming COMP153-08S Week 5 Lecture 1: Screen Design Subroutines and Functions.
GUI Applications ButtonGroup and JRadioButton. Contents A.Problem: The Metric Converter Application B.Solution C.Exercise: Moving all calculations into.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
SEEM3460 Tutorial GUI in Java. Some Basic GUI Terms Component (Control in some languages) the basic GUI unit something visible something that user can.
Introduction to visual programming C#. Learning Outcomes In this chapter, you will learn about :  Event-Based Programming  The Event Based Model  Application.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
Ajmer Singh PGT(IP) JAVA IDE Programming - I. Ajmer Singh PGT(IP) GUI (Graphical User Interface) It is an interface that uses a graphic entities along.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
1 Lecture 8: User Interface Components with Swing.
Visual Basic.NET BASICS Lesson 9 Nested If Statements and Radio Buttons.
Using Forms and Form Elements In Visual Basic.NET.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Prepared by: Dr. Abdallah Mohamed, AOU-KW Unit7: Event-driven programming 1.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Topics Graphical User Interfaces Using the tkinter Module
Chapter Topics 15.1 Graphical User Interfaces
Event-driven programming
Event loops 16-Jun-18.
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Event Driven Programming
Event loops.
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Chapter 15: GUI Applications & Event-Driven Programming
Event loops 8-Apr-19.
Tonga Institute of Higher Education
Event loops.
Event loops 19-Aug-19.
Presentation transcript:

GUI Programming Joseph Sant Sheridan College

Agenda Elements of GUI programming Component-Based Programming. Event-Based Programming. A process using a powerful IDE.

GUI Programming - Components GUI programming is done using pre-built components such as textboxes, buttons, radio buttons etc. Programmer will set and programmatically reset properties of these components. The components are capable of detecting events that happen to them (such as someone clicking on them). The programmer might attach an event listener to the component to perform a task when a specific event occurs.

Event-Driven Component Programming Layout appropriate components on a container component. Some components might allow the user to trigger an action. The programmer might want the program to perform some task when that action occurs (e.g. someone clicking on a button)

Event-Driven Component Programming Go Do this. If button clicked do this If radiobutton clicked do this If slider moved do this Go Sequential Event-Driven

Event-Driven Programming. In standard sequential programming, the programmer is in control of what is done and when it is done. In event-driven programming the programmer is still in control of what is done but loses control over when it is done. The user is in control of when a task is done.

Event Listeners. Event Listeners are objects or functions or methods that code a response to a specific event.

Event-Driven Component Programming EXAMPLE A button on a calculator program might add the numbers in two text fields when clicked. The programmer would have to attach an event listener to the click event of a button. The event listener contains code that parses the two text fields. add the numbers together. resets another field to the result of the addition.

Components/Widgets There are many components that can be used to develop GUI applications: –Text boxes –Radio Buttons –List Boxes –Combo boxes Containers are used to display several components or other container classes. –Frames. –Panels.

Layout Different schemes can be used to arrange the components on a screen. –Linear –Table –Grid –Others

Layouts LinearTableGrid

Developing GUI programs using a powerful IDE. Create a Android Application project. Add an Activity. Drag or select components from the pallette and position them on the form. Context menus for a given control typically allow you to select a number of possible listeners for a given event.

Questions? What is a listener? When are listener methods executed. Can you write a listener that never executes in a given program? Are layouts and containers the same thing?