TA: Nouf Al-Harbi NoufNaief.net :::

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

1 Graphical User Interfaces AWT and Swing packages Frames and Panels Components Nested Panels Images Reading for this Lecture: L&L, 3.9 – 3.11.
Corresponds with Chapter 12
Lecture 15 Graphical User Interfaces (GUI’s). Objectives Provide a general set of concepts for GUI’s Layout manager GUI components GUI Design Guidelines.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
10.1 AWT The AWT classes Users today expect a Graphical User Interface (GUI) Improves application usability Difficult to implement cross-platform.
GUI Programming in Java Tim McKenna GUI Programming Concepts l conventional programming: sequence of operations is determined by the program.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
A.k.a. GUI’s.  If you want to discuss your Lab 2 grade come see me this week. ◦ Office: 436 ERB. One hour prior to class ◦ Open to Appointments MWF 
GUI Basics: Introduction. Creating GUI Objects // Create a button with text OK JButton jbtOK = new JButton("OK"); // Create a label with text "Enter your.
GUI Programming in Java
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Applets and Frames CS 21a: Introduction to Computing I First Semester,
Introduction to GUI in Java 1. Graphical User Interface Java is equipped with many powerful,easy to use GUI component such as input and output dialog.
Lab 6: Shapes & Picture Extended Ellipse & Rectangle Classes Stand-Alone GUI Applications.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Creating GUIs in Java Using.
Dale Roberts GUI Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer.
Ch 3-4: GUI Basics Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Coming up: GUI Components.
1 CSC111H Graphical User Interfaces (GUIs) Introduction GUIs in Java Understanding Events A Simple Application The Containment Hierarchy Layout Managers.
1 Graphical User Interfaces AWT and Swing packages Frames and Panels Components Nested Panels Images Reading for this Lecture: L&L, 3.9 – 3.11.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Timer class and inner classes. Processing timer events Timer is part of javax.swing helps manage activity over time Use it to set up a timer to generate.
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.
Applets Yong Choi School of Business CSU, Bakersfield.
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.
CS324e - Elements of Graphics and Visualization Java GUIs - Event Handling.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
CIS Intro to JAVA Lecture Notes Set 8 9-June-05.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Outline Creating Objects The String Class The Random and Math Classes Formatting Output Enumerated Types Wrapper Classes Components and Containers Images.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Graphical User Interfaces Tonga Institute of Higher Education.
Java Programming, Second Edition Chapter Thirteen Understanding Swing Components.
Computer Science [3] Java Programming II - Laboratory Course Lab 4 -1 : Introduction to Graphical user interface GUI Components Faculty of Engineering.
Lecture # 6 Graphical User Interface(GUI). Introduction A graphical user interface (GUI) presents a user- friendly mechanism for interacting with an application.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
1 Lecture 8: User Interface Components with Swing.
Introduction to GUI Programming in Java: Frames, Simple Components, and Layouts.
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.
A Quick Java Swing Tutorial
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Chapter 9: Graphical User Interfaces
Topics Graphical User Interfaces Using the tkinter Module
A First Look at GUI Applications
Chapter Topics 15.1 Graphical User Interfaces
Chapter 2 – Introduction to the Visual Studio .NET IDE
Processing Timer Events
Ellen Walker Hiram College
Chap 7. Building Java Graphical User Interfaces
Graphical User Interfaces -- Introduction
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Timer class and inner classes
AWT Components and Containers
Graphics Programming - Frames
Week 8 Swing NetBeans GUI Builder
Topics Graphical User Interfaces Using the tkinter Module
Chapter 15: GUI Applications & Event-Driven Programming
Chapter 12 GUI Basics.
Graphical User Interface
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

TA: Nouf Al-Harbi NoufNaief.net ::: nouf200@hotmail.com Programming 2 LAB TA: Nouf Al-Harbi NoufNaief.net ::: nouf200@hotmail.com

Lab 10 Introduction to GUI

GUI stands for Graphical User Interface

A GUI component is an object that represents a screen element such as a button or a text field GUI-related classes are defined primarily in the java.awt and the javax.swing packages The Abstract Windowing Toolkit (AWT) was the original Java GUI package The Swing package provides additional and more versatile components Both packages are needed to create a Java GUI-based program GUI Components

A label is a GUI component that displays a line of text and/or an image GUI Components

A button is generate an action event GUI Components

A text field allows the user to enter one line of input GUI Components

A check box is a button that can be toggled on or off GUI Components

A group of radio buttons represents a set of mutually exclusive options – only one can be selected at any given time GUI Components

A dialog box is a window that appears on top of any currently active window GUI Components

A GUI container is a component that is used to hold and organize other components A frame is a container displayed as a separate window with a title bar It can be repositioned and resized on the screen as needed A panel is a container that cannot be displayed on its own but is used to organize other components A panel must be added to another container (like a frame) to be displayed GUI Containers

Examples

Example 1..

Example 1..

OK Button Code

Example 2..

Exit Button Code

Clear Button Code

Add Button Code

Example 2..

http://netbeans.org/kb/docs/java/gui-functionality.html#Exercise_1 Useful Reference..

End of Lab 10