Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations

Presentation on theme: "JAVA API (GUI) Subject:T0934 / Multimedia Programming Foundation Session:1 Tahun:2009 Versi:1/0."— Presentation transcript:

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

2 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

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

4 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

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

6 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

7 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

8 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

9 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

10 Sample Code Bina Nusantara

11 Sample Code Bina Nusantara

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

13 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);

14 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

15 Java GUI Bina Nusantara

16 Java GUI Bina Nusantara

17 Java GUI Bina Nusantara

18 Java GUI Bina Nusantara

19 Java GUI Bina Nusantara

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

21 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

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

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

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

Similar presentations

Ads by Google