JAVA API (GUI) Subject:T0934 / Multimedia Programming Foundation Session:1 Tahun:2009 Versi:1/0.

Slides:



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

In Review JAVA C++ GUIs - Windows Webopedia.com.
Graphical User Interfaces (Part IV)
CS18000: Problem Solving and Object-Oriented Programming.
COMP 321 Week 1. Application Server Programming Introduction to server-based programming using an object-oriented approach You will learn and reflect.
1 Chapter 8 Objects and Classes Lecture 2 Prepared by Muhanad Alkhalisy.
Graphical User Interfaces CS 2110 Spring Ivan Sutherland: “Sketchpad”,
Things to mention public static void main(String [] args) –The starting point for a free-standing Java application (i.e. one not run from the DrJava interactions.
Introduction to Java Classes, events, GUI’s. Understand: How to use TextPad How to define a class or object How to create a GUI interface How event-driven.
Graphics 2D 1 Subject:T0934 / Multimedia Programming Foundation Session:6 Tahun:2009 Versi:1/0.
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)
Graphical User Interfaces (GUIs) GUI: An application that uses graphical objects to interact with users GUI applications consist of: –Events: A user or.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 13: Advanced GUIs and Graphics J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
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.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
Introduction to Java Swing “We are the sultans of swing” – Mark Knopfler.
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
Chapter 13 Advanced GUIs and Graphics. Chapter Objectives Learn about applets Explore the class Graphics Learn about the class Font Explore the class.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 12 Advanced GUIs and Graphics.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 13 Creating User.
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
Applets and Frames CS 21a: Introduction to Computing I First Semester,
GUIs for Applets Introduction Applets and Swing/JFC Alternatives to Swing Look-and-Feel issues Example applet graphical user interfaces.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
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.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
Objectives of This Session
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 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.
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.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
CS Lecture 00 Swing overview and introduction Lynda Thomas
MSc Workshop - © S. Kamin, U. ReddyLect 3 - GUI -1 Lecture 3 - Graphical User Interfaces r GUI toolkits in Java API r JFrame r GUI components.
Object Oriented programming Instructor: Dr. Essam H. Houssein.
GUI Graphical User Interface. Outline Introduction Packages Components Layout Manager Events and Listeners Examples.
Applets and Frames. Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L14: GUI Slide 2 Applets Usually.
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.
Lec.10 (Chapter 8 & 9) GUI Jiang (Jen) ZHENG June 27 th, 2005.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 15 Creating User.
CHAPTER:07 JAVA IDE PROGRAMMING-II Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
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.
Introduction to Java Chapter 9 - Graphical User Interfaces and Applets1 Chapter 9 Graphical User Interfaces and Applets.
Swing. Introduction to Swing What is Swing? “ Swing is a diverse collection of lightweight components that can be used to build sophisticated user interfaces.”
Basics of GUI Programming Chapter 11 and Chapter 22.
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 Programming, Second Edition Chapter Thirteen Understanding Swing Components.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Computer Science [3] Java Programming II - Laboratory Course Lab 4 -1 : Introduction to Graphical user interface GUI Components Faculty of Engineering.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
Lecture # 6 Graphical User Interface(GUI). Introduction A graphical user interface (GUI) presents a user- friendly mechanism for interacting with an application.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
1 Lecture 8: User Interface Components with Swing.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
Designing a User Interface with Swing Assignment Swing: Update code of an earlier program.
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.
Welcome To java
Graphical user interface with Swing by jose maria gonzalez pinto
Chapter 13: Advanced GUIs and Graphics
תכנות מכוון עצמים בשפת JAVA
Basic Elements of The GUI
Advanced Programming in Java
Advanced GUIs and Graphics
Presentation transcript:

JAVA API (GUI) Subject:T0934 / Multimedia Programming Foundation Session:1 Tahun:2009 Versi:1/0

Bina Nusantara Learning Outcomes In the end of this session, students must be able to: –recognize Java technology –understand the concept of Graphics User Interfaces (GUI) –recognize the components and user actions of GUI –recognize Look And Feel (LAF) in Java

Bina Nusantara Course Outlines Java Technology Graphics User Interface (GUI) User Interface Components User Actions (Interactions) Java GUI User Interface Manager (Look And Feel)

Bina Nusantara Java Technology Both a programming language and a platform Java programming language is a high-level language that can be characterized by all of the following buzzwords: –Simple –Object Oriented –Distributed –Interpreted –Robust –Secure –Architecture Neutral –Portable –High performance –Multithreaded –Dynamic

Java Technology Software development process: JVM (multiple platforms) Bina Nusantara

Java Technology Platform is the hardware or software environment in which a program runs. The Java platform has two components: –The Java Virtual Machine –The Java Application Programming Interface (API) API: Core functionality of the Java. –Classes: basic objects, networking and security, XML generation and database access, and more Bina Nusantara

Graphics User Interface (GUI) Pronounced /’ ɡ u:i/  “goo-ey” Human-computer interface (way for humans to interact with computers) Uses windows, icons and menus Can be manipulated by a mouse Often to a limited extent by a keyboard Three Concepts: –Graphics (text, image, geometric figures) –User Interface Components –User Actions (Interactions) Bina Nusantara

User Interface Components Bina Nusantara Frame (Top-level Window) Title Bar Menu Bar Menu Items Button Combo Box Text Field Image Icon Check Box Radio Button Tab Pane Mnemonics Vertical Scroll Bar Horizontal Scroll Bar

User Actions (Interactions) Key Mouse Button Menu Bina Nusantara Actions: Press Key Click Mouse Click Button Select Menu Events: Key Event Mouse Event Action Event PROGRAM causes notify Listen Handle User respond action User click showclick show

Sample Code Bina Nusantara

Sample Code Bina Nusantara

Sample Code File saved as “ComponentsSample.java” setBounds(int x, int y, int width, int height) See JDK Documentation as tutorial Bina Nusantara

Sample Code Bina Nusantara JFrame setSize(300,200); JPanel setTitle("Components Sample"); JLabel label.setBounds(10,10,120,20); JCheckBox checkBox.setBounds(5,40,150,20); JTextField textField.setBounds(130,10,150,20); JComboBox comboBox.setBounds(160,40,120,20); JButton button.setBounds(210,80,70,20);

Java GUI Java GUI classes: –Container Classes JFrame, JPanel, JApplet –Component Classes JButton, JTextField, JTextArea, JComboBox, etc –Helper Classes Graphics, Color, Font, Dimension, etc Java GUI Components: –Abstract Windows Toolkit (AWT)  heavyweight components Button, TextField, TextArea, ComboBox, etc –Swing  lightweight components JButton, JTextField, JTextArea, JComboBox, etc Bina Nusantara

Java GUI Bina Nusantara

Java GUI Bina Nusantara

Java GUI Bina Nusantara

Java GUI Bina Nusantara

Java GUI Bina Nusantara

Java GUI Bina Nusantara Java also has a very good system for Look and Feels (LAFs)  See Additional Material 1

Java Java can be downloaded at: x.jsp x.jsp Java Documentation (help) can be downloaded at: x.html or x.jsp x.html x.jsp Bina Nusantara

References About the Java Technology. Sun Microsystems Characteristics of Java. Liang The Java Language Environment. Sun Microsystems What Can Java Technology Do?. Sun Microsystems Java Technology Concept Map. Sun Microsystems Java Technology. University of Wollongong GUI Definition. Linfo Graphics Programming. University of Wollongong Graphical User Interface. Wikipedia Elements of graphical user interfaces. Wikipedia

Bina Nusantara References java.awt.Component Hierarchy Class Diagram. Falkhausen javax.swing.* Class Diagrams. Falkhausen Java Swing Classes. Holub Introduction to Java Programming. 7ed. Liang p13. Swing Components and Containment Hierarchy. The Hong Kong Polytechnic University Java SE Downloads. Sun Microsystems Java Overview (Documentation). Sun Microsystems