Week 8 Swing NetBeans GUI Builder

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

CMSC 341 Building Java GUIs. 09/26/2007 CMSC 341 GUI 2 Why Java GUI Development? Course is about Data Structures, not GUIs. We are giving you the opportunity.
Corresponds with Chapter 12
User Interface Design CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Unit 091 Introduction to GUI Programming Introduction to User Interfaces Introduction to GUI Programming GUI Design Issues GUI Programming Issues Java.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh 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.
Java Swing Chris North cs3724: HCI. AWT to Swing AWT: Abstract Windowing Toolkit import java.awt.* Swing: new with Java2 import javax.swing.* Extends.
Graphic User Interfaces Part 1. Typical GUI Screen from Microsoft Word What GUI “components” can you see? –Menus? Buttons? Labels? What else? –Anything.
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
Java Programming Chapter 10 Graphical User Interfaces.
Software Construction Lecture 10 Frameworks
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.
Applets and Frames CS 21a: Introduction to Computing I First Semester,
Object Oriented Programming Ders 11: Interfaces Mustafa Emre İlal
Java GUI CSCE 190 – Java Instructor: Joel Gompert Mon, July 26, 2004.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
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.
Objectives of This Session
Session 27 Swing vs. AWT. AWT (Abstract Window ToolKit) It is a portable GUI library for stand-alone applications and/or applets. The Abstract Window.
GUIs in Java Swing, Events CS2110, SW Development Methods Readings: MSD, Chapter 12 Lab Exercise.
GUI development in Java L. Grewe Two methodologies for things to appear on the screen 1. By painting / drawing e.g. drawing an Image e.g. drawing an.
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.
Graphic User Interface. Graphic User Interface (GUI) Most of us interact with computers using GUIs. GUIs are visual representations of the actions you.
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.
ITEC 109 Lecture 27 GUI. GUIs Review Sounds –Arrays hold sample values –Creating a keyboard –Sound effects Homework 3 –The big two –Due after break –Lab.
SWING 101. IF YOU GET LOST - IMPORTANT LINKS  Swing articles:
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.
CS Fall 2012, Lab 09 Haohan Zhu. Boston University Slideshow Title Goes Here CS Fall 2012, Lab /20/2015 GUI - Graphical User Interface.
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.
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.
CS 4244: Internet Programming User Interface Programming in Java 1.0.
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.”
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.
Review_6 AWT, Swing, ActionListener, and Graphics.
Basics of GUI Programming Chapter 11 and Chapter 22.
1 Chapter 16: Creating Windows. 2 Basics of GUI Programming How to create a Window. TryWindow.java You always need a JFrame component before creating.
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 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.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
1 Lecture 8: User Interface Components with Swing.
Applets. 9/04/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L12: Applets Slide 2 Applets Usually.
Introduction to GUI Programming in Java: Frames, Simple Components, and Layouts.
Getting Started with GUI Programming Chapter 10 CSCI 1302.
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.
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.
Graphical User Interfaces
Welcome To java
Graphical user interface with Swing by jose maria gonzalez pinto
Ellen Walker Hiram College
Introduction to Graphical Interface Programming in Java
GUIS: Graphical User Interfaces
תכנות מכוון עצמים בשפת JAVA
Chapter 12 GUI Basics.
Graphical User Interface
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

Week 8 Swing NetBeans GUI Builder PROG21478 Week 8 Swing NetBeans GUI Builder 2/21/2019 Wendi Jollymore, FAST

Swing A toolkit used to develop Uis (User Interfaces) GUI = Graphical User Interface Part of Java since version 1.2 Most classes in javax.swing package Many classes start with “J” E.g. JTextField, JLabel, JPanel, JButton 2/21/2019 Wendi Jollymore, FAST

AWT vs. Swing AWT = Abstract Windowing Toolkit For GUI development before Swing Heavy-weight components Not as platform-independent Relies on platform’s native code Affects reliability/efficiency of app Affects functionality/appearance E.g. button functionality/appearance limited by platform’s definition of a button Transparency, rounded corners, etc 2/21/2019 Wendi Jollymore, FAST

AWT vs. Swing Light-weight components Written in Java code Except JApplet, JDialog, JFrame Written in Java code Not platform’s native code Allows for extra functionality, appearance, etc. 2/21/2019 Wendi Jollymore, FAST

Swing API See Figure 12.1 in text, page 447 3 Categories of classes Component classes Container classes GUI Helper classes 2/21/2019 Wendi Jollymore, FAST

Component Classes Anything that can be displayed on the UI java.awt.Component Parent of all component classes, including containers javax.swing.JComponent Parent of Swing light-weight components 2/21/2019 Wendi Jollymore, FAST

Container Classes java.awt.Container Can hold instances of Component and Component children Top-Level containers Containers that can be displayed without being contained inside another container E.g. JFrame, JPanel Note that Container is a child of Component 2/21/2019 Wendi Jollymore, FAST

GUI Helper Classes java.awt package Graphics, Font, FontMetrics, Color, Dimension, LayoutManager, etc Used to describe properties of GUI components E.g. colours, fonts, layouts 2/21/2019 Wendi Jollymore, FAST

JFrame Class The main container that you’ll use The main window for your GUI You can then add other components: JLabel JTextField JButton Etc… 2/21/2019 Wendi Jollymore, FAST

NetBeans GUI Builder In Class Demo!! 2/21/2019 Wendi Jollymore, FAST