User Interface Design CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.

Slides:



Advertisements
Similar presentations
User Interfaces II GUI – Awt, Swing, Web
Advertisements

Introduction to Swing Components Chapter 14. Part of the Java Foundation Classes (JFC) Provides a rich set of GUI components Used to create a Java program.
Graphical User Interfaces CS 2110 Spring Ivan Sutherland: “Sketchpad”,
 The Java Foundation Classes (JFC) are a set of packages encompassing the following APIs:  Abstract Window Toolkit (AWT) : native GUI components  Swing.
CSE 331 Software Design & Implementation Hal Perkins Winter 2013 Java Graphics & GUIs 1.
 What are the basic GUI components we’ve learned so far? › JFrame › JPanel › JButton › JLabel › JTextArea › JTextField › JCheckBox › JRadioButton › Paint.
Unit 091 Introduction to GUI Programming Introduction to User Interfaces Introduction to GUI Programming GUI Design Issues GUI Programming Issues Java.
Java Swing Overview A.O’Riordan, Nov., 2007 Includes notes by K. Brown,
Understanding SWING Architecture CS 4170 UI Design Hrvoje Benko Oct. 9, 2001.
Graphical User Interfaces (GUIs) GUI: An application that uses graphical objects to interact with users GUI applications consist of: –Events: A user or.
THE SWING UI TOOLKIT Mostly from “The Swing Connection”The Swing Connection.
Creating a GUI with Swing. Introduction Very useful link: Swing – is a part of JFC (Java Foundation.
Implementing GUIs in Java ● The Java Foundation Classes (JFC) are a set of packages encompassing the following APIs: – Abstract Window Toolkit (AWT): native.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng 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.
CS3 - AWT/Swing1 The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness –The Abstract.
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
Creating Graphical User Interfaces (GUIs) in Java CSE301 University of Sunderland Harry R Erwin, PhD.
Draw Shapes Introduction to simple graphics. What is a Component? A class that resides in the java.awt package Examples include: –Button, java.awt.Button.
Inheritance Abstract Classes Check out Inheritance from SVN.
Object Oriented Programming Ders 11: Interfaces Mustafa Emre İlal
Introduction to Swing Components Chapter 14.  Part of the Java Foundation Classes (JFC)  Provides a rich set of GUI components  Used to create a Java.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Creating GUIs in Java Using.
Tables CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
GUI Chapter 10 Graphics context and objects Creating a window based application JFrame, JTextField, JButton Containers and Controls Graphics commands Layout.
10/24/20151 Java GUI Programming. 10/24/20152 What is a GUI? Java has standard packages for creating custom Graphical User Interfaces Some of the fundamental.
1 CSE 331 Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT slides created by Marty Stepp based on materials by M. Ernst, S.
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.
1.  Container  JComponent  AbstractButton  JButton  JMenuItem  JCheckBoxMenuItem  JMenu  JRadioButtonMenuItem  JToggleButton  JCheckBox  JRadioButton.
CS Lecture 00 Swing overview and introduction Lynda Thomas
Java Programming: Advanced Topics 1 Components and Facilities for Rich Graphical User Interfaces Chapter 7.
Object Oriented programming Instructor: Dr. Essam H. Houssein.
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.
CSCI Swing1 The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness –The Abstract.
CS Fall 2012, Lab 09 Haohan Zhu. Boston University Slideshow Title Goes Here CS Fall 2012, Lab /20/2015 GUI - Graphical User Interface.
GUI Basics. What is GUI? A graphical user interface (GUI) is a type of user interface item that allows people to interact with programs in more ways than.
Programming with Java’s Swing API February 4, 2003 CMPS Advanced Programming Graphical User Interfaces.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
Week 6: Basic GUI Programming Concepts in Java Example: JFrameDemo.java container : a screen window/applet window/panel that groups and arranges components.
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.
The Swing GUI Components Chapter 29 An enhanced alternative to AWT The PC does not need an appletviewer or browser Swing overcomes some AWT drawbacks.
Graphical User Interfaces are Trees CS1316: Representing Structure and Behavior.
Basics of GUI Programming Chapter 11 and Chapter 22.
Java GUI COMP 401 Fall 2014 Lecture 16 10/20/2014.
GUI Components CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Java Swing One of the most important features of Java is its ability to draw graphics.
Computer Science [3] Java Programming II - Laboratory Course Lab 4 -1 : Introduction to Graphical user interface GUI Components Faculty of Engineering.
1 Lecture 8: User Interface Components with Swing.
Menus and Toolbars CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Getting Started with GUI Programming Chapter 10 CSCI 1302.
Java Swing. Graphical User Interfaces (GUIs) GUI: An application that uses graphical objects to interact with users GUI applications consist of: – Events:
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.
Chapter 6 Building Java GUIs. MVC Model View Controller The model passes its data to the view for rendering The view determines which events are passed.
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.
A Quick Java Swing Tutorial
Abstract Window Toolkit (AWT): native GUI components
Introduction to Graphical Interface Programming in Java
Event Driven Programming and Graphical User Interface
תכנות מכוון עצמים בשפת JAVA
Week 8 Swing NetBeans GUI Builder
Java 2 Swing B.Ramamurthy 5/1/2019 B.Ramamurthy.
Lecture 4: Standard Java Graphics
Presentation transcript:

User Interface Design CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L

Outline USC CSCI 201L2/22 ▪J▪Java GUI Organization

Java Graphical Programming ▪Java has two different frameworks for graphical user interfaces ›Abstract Windows Toolkit (AWT) ›Swing ▪AWT uses heavyweight components that call into native operating system components ›AWT components are in the java.awt package ▪Swing uses lightweight components that are platform independent ›Some Swing components can call into native OS components for rendering windows and panels ›Most Swing components start with a J and are in the javax.swing package USC CSCI 201L3/22 Java GUI Organization

Java GUI API ▪The Java GUI API is split into the following groups ›Component classes ›Container classes ›Helper classes ▪Component classes are used for creating the user interface ›JButton, JTextField, JLabel ▪Container classes are used to contain and align other components ›JFrame, JPanel ▪Helper classes are used to support GUI components ›Color, Font USC CSCI 201L4/22 Java GUI Organization

Component Classes ▪Component classes can be displayed in a user interface ›They inherit from the javax.swing.JComponent class ▪Here are the direct subclasses of JComponent ›AbstractButton, BasicInternalFrameTitlePane, Box, Box.Filler, JColorChooser, JComboBox, JFileChooser, JInternalFrame, JInternalFrame.JDesktopIcon, JLabel, JLayer, JLayeredPane, JList, JMenuBar, JOptionPane, JPanel, JPopupMenu, JProgressBar, JRootPane, JScrollBar, JScrollPane, JSeparator, JSlider, JSpinner, JSplitPane, JTabbedPane, JTable, JTableHeader, JTextComponent, JToolBar, JToolTip, JTree, JViewport USC CSCI 201L5/22 Java GUI Organization

Container Classes ▪Containers allow components to be added to them to be displayed ›Containers can also have other containers added to them ▪Containers are also components, so anywhere we can add a component, we could also add a container ›java.awt.Container inherits from java.awt.Component ▪Container classes include ›JFrame ›JPanel ›JApplet ›JDialog USC CSCI 201L6/22 Java GUI Organization

Helper Classes ▪Helper classes describe the properties of GUI components, such as graphics context, colors, fonts, and dimensions ▪Helper classes include ›java.awt.Graphics ›java.awt.Color ›java.awt.Font ›java.awt.FontMetrics ›java.awt.Dimension ›java.awt.LayoutManager ▪Note that the helper classes are in the java.awt package ›Only the AWT components are heavyweight USC CSCI 201L7/22 Java GUI Organization