Basic Elements of The GUI

Slides:



Advertisements
Similar presentations
Unit 3 Graphical User Interface (GUI) Dr. Magdi AMER.
Advertisements

JAVA API (GUI) Subject:T0934 / Multimedia Programming Foundation Session:1 Tahun:2009 Versi:1/0.
Fall 2007CS 225 Graphical User Interfaces Event Handling Appendix C.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Lecture 15 Graphical User Interfaces (GUI’s). Objectives Provide a general set of concepts for GUI’s Layout manager GUI components GUI Design Guidelines.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L03 (Chapter 15) Creating.
Creating a GUI with Swing. Introduction Very useful link: Swing – is a part of JFC (Java Foundation.
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.
GUI Programming in Java
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
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.
Object Oriented Programming Ders 11: Interfaces Mustafa Emre İlal
MIT AITI 2003 Lecture 17. Swing - Part II. The Java Event Model Up until now, we have focused on GUI's to present information (with one exception) Up.
1 CSC111H Graphical User Interfaces (GUIs) Introduction GUIs in Java Understanding Events A Simple Application The Containment Hierarchy Layout Managers.
1 Outline 1 Introduction 2 Overview of Swing Components 3 JLabel 4 Event Handling 5 TextFields 6 How Event Handling Works 7 JButton 8 JCheckBox and JRadioButton.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Swing GUI Components You can create graphics components to place on your applet using classes available in the Swing package ( javax.swing ) Class names.
MT311 Java Application Development and Programming Languages Li Tak Sing ( 李德成 )
ITEC 109 Lecture 27 GUI Interaction. Review GUI basics JFrame JPanel JLabel, JButton, JTextField Layout managers –Flow / Box –Border / Grid.
Graphical User Interfaces (Part 2) 1. View  view  presents the user with a sensory (visual, audio, haptic) representation of the model state  a user.
CS Fall 2012, Lab 09 Haohan Zhu. Boston University Slideshow Title Goes Here CS Fall 2012, Lab /20/2015 GUI - Graphical User Interface.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Introduction to Java Chapter 9 - Graphical User Interfaces and Applets1 Chapter 9 Graphical User Interfaces and Applets.
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
Review_6 AWT, Swing, ActionListener, and Graphics.
Creating User Interfaces Event-Driven Programming.
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.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
1 Event Driven Programs Rick Mercer. 2 So what happens next?  You can layout a real pretty GUI  You can click on buttons, enter text into a text field,
Swing GUI Components So far, we have written GUI applications which can ‘ draw ’. These applications are simple, yet typical of all Java GUI applications.
1 Lecture 8: User Interface Components with Swing.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
GUIs & Event-Driven Programming Chapter 11 Review.
Java Swing What is swing? Swing is a ”Lightweight” GUI ToolKit for Java Different from AWT / SWT Toolkits for GUIs Few lines of code to produce GUI elements.
Introduction Many Java application use a graphical user interface or GUI (pronounced “gooey”). A GUI is a graphical window or windows that provide interaction.
CompSci 230 S Programming Techniques
A First Look at GUI Applications Radio Buttons and Check Boxes
Chapter 12 Event-Driven Programming
A First Look at GUI Applications
Chapter Topics 15.1 Graphical User Interfaces
Java GUI.
Event loops 16-Jun-18.
Processing Timer Events
Graphical User Interface (pronounced "gooey")
Graphical user interface with Swing by jose maria gonzalez pinto
Java Programming: From Problem Analysis to Program Design,
Ellen Walker Hiram College
Event-driven programming for GUI
Event Driven Programming
GUIS: Graphical User Interfaces
Event loops.
Event loops 17-Jan-19.
Event loops 17-Jan-19.
Graphical User Interfaces in Java Event-driven programming
Steps to Creating a GUI Interface
Chapter 15: GUI Applications & Event-Driven Programming
Event loops 8-Apr-19.
Tonga Institute of Higher Education
Event loops.
Let us Flex our Gooey Guis, Sire
CHAPTER FOUR VARIABLES AND CONSTANTS
Event loops.
Event loops 19-Aug-19.
Graphical User Interface
Java GUI programming with Swing
Presentation transcript:

Basic Elements of The GUI By: Brandon Henderson and James Merino

About Graphical User Interface Commonly used on operating systems such as Windows and Mac Provides a much user-friendly interface for users Are event driven

What GUIs look like What Text-Based looks like

The Basic Elements of GUIs JTextField – Input through text Jlabel – Used to display text Jbutton – Input through a mouse click

Other more complex GUI elements… JPanel JComboBox JCheckBox

Code snippets JPanel – panel = new Jpanel(parameters go here); JLabel – label = new JLabel(text, additional parameters); JTextField – text = new TextField(text, width, additional parameters); JButton = new Jbutton(text, additional parameters); Requires an action listener method where the code that will be run when the button is pressed can be executed. Adding Elements: panel.add(name of element); button.addActionListener(this);

Thanks for listening!