Introduction p. 1 JFC Architecture p. 5 Introduction to JFC p. 7 The JFC 1.2 Extension p. 8 Swing p. 9 Drag and Drop p. 16 Accessibility p.

Size: px
Start display at page:

Download "Introduction p. 1 JFC Architecture p. 5 Introduction to JFC p. 7 The JFC 1.2 Extension p. 8 Swing p. 9 Drag and Drop p. 16 Accessibility p."

Transcription

1 Introduction p. 1 JFC Architecture p. 5 Introduction to JFC p. 7 The JFC 1.2 Extension p. 8 Swing p. 9 Drag and Drop p. 16 Accessibility p. 17 MVC Architecture p. 19 The MVC Architecture p. 20 Combined View and Control in JFC p. 21 Factory Design Pattern p. 25 Singleton Pattern p. 31 JComponent p. 35 Top of the JFC Visual Component Hierarchy p. 36 Client Properties p. 37 ToolTip Support p. 38 Border Property p. 39 Size Preferences p. 41 Keystroke Handling p. 41 Scrolling Support p. 46 Focus Transversal Support p. 46 Property Listener Support p. 48 Pluggable Look-and-Feel Support p. 50 Miscellaneous Features p. 51 JFC Programming Techniques p. 55 Thread Safety Requirements of JFC p. 56 The Repaint Manager p. 59 Actions p. 64 JFC Components p. 73 Basic Components p. 75 Separator p. 76 Borders p. 76 Icons p. 106 Label Components p. 110 The Button Hierarchy p. 121 The ButtonModel Interface p. 122 JFC Button Hierarchy p. 128 Simple Buttons: The JButton Class p. 131 Using Actions with Buttons p. 136 JToggleButton p. 141 Check Boxes p. 145

2 Radio Buttons p. 147 Text Components p. 153 The JTextField Class p. 154 The JPasswordField Class p. 157 The JTextArea Class p. 160 Document Model p. 164 The JEditorPane Class p. 173 Frame Windows p. 189 The JFrame Class p. 190 JApplet p. 206 The JWindow Class p. 208 Menus and Toolbars p. 215 Creating Menus p. 216 Types of Menu Items p. 228 Placing Menus p. 247 Creating Toolbars p. 261 JList, JComboBox, and Bound Controls p. 267 Rubber Stamp Drawing p. 268 Using the JList Class p. 272 Combo Boxes p. 288 Bounded Components p. 299 The JSlider Control p. 304 Tree Component p. 321 Using the JTree Component p. 322 The swing, tree Package p. 327 Table Component p. 359 Table Elements p. 360 A Simple Table p. 361 Table Selection Models p. 365 Column Creation and Resizing Modes p. 367 Models and Support Classes Used by the JTable Class p. 369 Scrolling a Table p. 406 Container Components p. 409 JPanel and Box Classes p. 411 The JPanel Class p. 412 The Box Class p. 413 The JBox Class p. 427 JTabbedPane Class p. 431 JTabbedPane Class Usage p. 432 Scrolling Components p. 445 The JViewport Class p. 446

3 The JScrollPane Class p. 449 JComponent Scrolling Support p. 456 Split Pane p. 461 The JSplitPane Class p. 462 Internal Frames p. 483 The JInternalFrame Class p. 484 The JDesktopPane Class p. 490 Integrating JInternalFrame and JDesktopPane Usage p. 493 Dialog Boxes p. 503 JOptionPane p. 505 Common JOptionPane Configuration p. 506 Predefined Dialog Boxes p. 509 Rolling Your Own p. 520 Internal Frame Versions p. 529 Choice Dialog Boxes p. 535 The JFileChooser Class p. 536 The JColorChooser Class p. 557 JDialog p. 571 JDialog Configuration p. 572 JDialog Modality p. 573 Closing Options p. 574 JDialog Class Usage Example p. 574 Progress Monitor p. 587 Using the ProgressMonitor p. 588 Example of ProgressMonitor Usage p. 590 Extending JFC Components p. 595 Extending Existing Components p. 597 The Pluggable Look-and-Feel (.plaf) Architecture p. 598 Creating a Custom Look-and-Feel p. 613 Customizing Existing Look-and-Feels p. 614 Creating a Look-and-Feel p. 635 The Multiplexing Look-And-Feel p. 675 Building a Custom Component p. 679 Creating a Custom Component p. 680 Advanced JFC Concepts p. 715 ToolTips and Debug Graphics p. 717 ToolTips Basics p. 718 ToolTips Example p. 721 Using Debug Graphics p. 728 Focus Managers p. 735 About Focus and Focus Managers p. 737

4 How Swing's Default Focus Manager Works p. 737 Managing Focus from Components p. 738 Using the Focus Manager p. 752 Writing a Custom Focus Manager p. 754 Custom Cursors p. 763 Toolkit Methods for Custom Cursors p. 764 Component Methods for Cursors p. 765 Example Using a Custom Cursor p. 765 Overview of CustomCursorDemo Example p. 767 Creating Images for Custom Cursors p. 769 Undo and Redo p. 771 Supporting Basic Undo Operations p. 772 A Basic Undo Example p. 775 Supporting Undo with Swing Text Components p. 783 Keyboard Navigation p. 789 About Accelerators, Mnemonics, and Shortcuts p. 790 Using Mnemonics p. 791 Using Menu Accelerators p. 795 Using Shortcuts (Hot Keys) p. 799 Keyboard Navigation with Action Objects p. 803 Using Mnemonics with Labels p. 807 Pluggable Look-and-Feel p. 809 Overview of Pluggable Look-and-Feel p. 810 Using the UI Manager p. 813 Timers p. 837 Timer Basics p. 838 Example Using Periodic and One-Shot Timers p. 841 Example Illustrating Timer Resolution p. 847 Swing Utilities p. 855 The SwingUtilities Class p. 856 The SwingConstants Class p. 863 Accessibility p. 865 About Accessibility and Assistive Technologies p. 866 Overview of JDK Support for Accessibility p. 867 Supporting Accessibility in JFC Applications p. 869 Supporting Accessibility in Custom Components p. 872 Creating Assistive Technologies p. 881 Drag and Drop p. 883 Overview of JFC Drag and Drop p. 884 Implementing a Drop Target p. 886 Implementing a Drag Source p. 898

5 Appendixes JFC Class Reference p. 915 The Joys of Object-Oriented Class Libraries p. 916 Developing with OO Class Libraries p. 917 New UI Developments in the JDK 1.1 p. 917 java.awt p. 924 javax.swing p com.foley.chart Package Source Code p FAxis Class p FAxisUI Class p FChart Class p FChartLayoutManager Class p FChartUI Class p MetalFAxisUI Class p MetalFChartUI Class p WindowsFAxisUI Class p WindowsFChartUI Class p com.foley.utility Source Code p AButton.java p ActionFocusListener.java p AlbumCollectionItem.java p AlbumTreeRenderer.java p AlbumTypes.java p ApplicationFrame.java p ApplicationMouseListener.java p ColorEditor.java p ExitAction.java p FPartialEtchedBorder.java p ImageLoader.java p JavaFileView.java p JBox.java p MDIFrame.java p MetalNonExpandingTreeUI.java p NonExpandingTreeUI.java p NoOpAction.java p OutlandishTheme.java p PercentSlider.java p PrintAction.java p SetJavaLookAndFeelAction.java p SetLookAndFeelAction.java p SetMotifLookAndFeelAction.java p. 1286

6 SetWindowsLookAndFeel.java p SimpleListCellRenderer.java p SliderValuePanel.java p SplashWindow.java p TableMap.java p TableSorter.java p TextFilterDocument.java p TreeLeafEditor.java p TwoStateInterface.java p WindowsNonExpandingTreeUI.java p Index p Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.

Swing. By Iqtidar Ali

Swing. By Iqtidar Ali Swing By Iqtidar Ali Background of Swing We have been looking at AWT (Abstract Window ToolKit) components up till now. Programmers were not comfortable when doing programming with AWT. Bcoz AWT is limited

More information

Java IDE Programming-I

Java IDE Programming-I Java IDE Programming-I Graphical User Interface : is an interface that uses pictures and other graphic entities along with text, to interact with user. User can interact with GUI using mouse click/ or

More information

Swing UI. Powered by Pentalog. by Vlad Costel Ungureanu for Learn Stuff

Swing UI. Powered by Pentalog. by Vlad Costel Ungureanu for Learn Stuff Swing UI by Vlad Costel Ungureanu for Learn Stuff User Interface Command Line Graphical User Interface (GUI) Tactile User Interface (TUI) Multimedia (voice) Intelligent (gesture recognition) 2 Making the

More information

Introduction to the JAVA UI classes Advanced HCI IAT351

Introduction to the JAVA UI classes Advanced HCI IAT351 Introduction to the JAVA UI classes Advanced HCI IAT351 Week 3 Lecture 1 17.09.2012 Lyn Bartram lyn@sfu.ca About JFC and Swing JFC Java TM Foundation Classes Encompass a group of features for constructing

More information

Is image everything?

Is image everything? Is image everything? Review Computer Graphics technology enables GUIs and computer gaming. GUI's are a fundamental enabling computer technology. Without a GUI there would not be any, or much less: Computer

More information

Chapter 12 GUI Basics

Chapter 12 GUI Basics Chapter 12 GUI Basics 1 Creating GUI Objects // Create a button with text OK JButton jbtok = new JButton("OK"); // Create a label with text "Enter your name: " JLabel jlblname = new JLabel("Enter your

More information

Supporting Materials

Supporting Materials Preface p. xxiii Introduction p. xxiii Key Features p. xxiii Chapter Outlines p. xxiv Supporting Materials p. xxvi Acknowledgments p. xxvii Java Fundamentals p. 1 Bits, Bytes, and Java p. 2 The Challenge

More information

Lecture 18 Java Graphics and GUIs

Lecture 18 Java Graphics and GUIs CSE 331 Software Design and Implementation The plan Today: introduction to Java graphics and Swing/AWT libraries Then: event-driven programming and user interaction Lecture 18 Java Graphics and GUIs None

More information

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing Introduction to Graphical Interface Programming in Java Introduction to AWT and Swing GUI versus Graphics Programming Graphical User Interface (GUI) Graphics Programming Purpose is to display info and

More information

Handout 14 Graphical User Interface (GUI) with Swing, Event Handling

Handout 14 Graphical User Interface (GUI) with Swing, Event Handling Handout 12 CS603 Object-Oriented Programming Fall 15 Page 1 of 12 Handout 14 Graphical User Interface (GUI) with Swing, Event Handling The Swing library (javax.swing.*) Contains classes that implement

More information

CSE 143. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

CSE 143. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT CSE 143 Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia http://www.cs.washington.edu/331/

More information

Chapter 6: Graphical User Interfaces

Chapter 6: Graphical User Interfaces Chapter 6: Graphical User Interfaces CS 121 Department of Computer Science College of Engineering Boise State University April 21, 2015 Chapter 6: Graphical User Interfaces CS 121 1 / 36 Chapter 6 Topics

More information

Tool Kits, Swing. Overview. SMD158 Interactive Systems Spring Tool Kits in the Abstract. An overview of Swing/AWT

Tool Kits, Swing. Overview. SMD158 Interactive Systems Spring Tool Kits in the Abstract. An overview of Swing/AWT INSTITUTIONEN FÖR Tool Kits, Swing SMD158 Interactive Systems Spring 2005 Jan-28-05 2002-2005 by David A. Carr 1 L Overview Tool kits in the abstract An overview of Swing/AWT Jan-28-05 2002-2005 by David

More information

CSE 331 Software Design & Implementation

CSE 331 Software Design & Implementation CSE 331 Software Design & Implementation Hal Perkins Winter 2018 Java Graphics and GUIs 1 The plan Today: introduction to Java graphics and Swing/AWT libraries Then: event-driven programming and user interaction

More information

Graphical User Interface (GUI) components in Java Applets. With Abstract Window Toolkit (AWT) we can build an applet that has the basic GUI

Graphical User Interface (GUI) components in Java Applets. With Abstract Window Toolkit (AWT) we can build an applet that has the basic GUI CBOP3203 Graphical User Interface (GUI) components in Java Applets. With Abstract Window Toolkit (AWT) we can build an applet that has the basic GUI components like button, text input, scroll bar and others.

More information

CS 251 Intermediate Programming GUIs: Components and Layout

CS 251 Intermediate Programming GUIs: Components and Layout CS 251 Intermediate Programming GUIs: Components and Layout Brooke Chenoweth University of New Mexico Fall 2017 import javax. swing.*; Hello GUI public class HelloGUI extends JFrame { public HelloGUI ()

More information

Java Graphical User Interfaces

Java Graphical User Interfaces Java Graphical User Interfaces 1 The Abstract Windowing Toolkit (AWT) Since Java was first released, its user interface facilities have been a significant weakness The Abstract Windowing Toolkit (AWT)

More information

PROGRAMMING DESIGN USING JAVA (ITT 303) Unit 7

PROGRAMMING DESIGN USING JAVA (ITT 303) Unit 7 PROGRAMMING DESIGN USING JAVA (ITT 303) Graphical User Interface Unit 7 Learning Objectives At the end of this unit students should be able to: Build graphical user interfaces Create and manipulate buttons,

More information

Summary Chapter 25 GUI Components: Part 2

Summary Chapter 25 GUI Components: Part 2 1040 Chapter 25 GUI Components: Part 2 ponent on the line. TheJTextField is added to the content pane with a call to our utility method addcomponent (declared at lines 79 83). MethodaddComponent takes

More information

Chapter 13 GUI Basics. Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved.

Chapter 13 GUI Basics. Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved. Chapter 13 GUI Basics 1 Motivations The design of the API for Java GUI programming is an excellent example of how the object-oriented principle is applied. In the chapters that follow, you will learn the

More information

China Jiliang University Java. Programming in Java. Java Swing Programming. Java Web Applications, Helmut Dispert

China Jiliang University Java. Programming in Java. Java Swing Programming. Java Web Applications, Helmut Dispert Java Programming in Java Java Swing Programming Java Swing Design Goals The overall goal for the Swing project was: To build a set of extensible GUI components to enable developers to more rapidly develop

More information

Chapter 12 GUI Basics. Motivations. The design of the API for Java GUI programming

Chapter 12 GUI Basics. Motivations. The design of the API for Java GUI programming Chapter 12 GUI Basics 1 Motivations The design of the API for Java GUI programming is an excellent example of how the object-orientedoriented principle is applied. In the chapters that follow, you will

More information

John Zukowski's Definitive Guide to Swing for Java 2

John Zukowski's Definitive Guide to Swing for Java 2 John Zukowski's Definitive Guide to Swing for Java 2 JOHN ZUKOWSKI APress Media, LLC John Zukowski's Definitive Guide to Swing for Java 2 Copyright ~1999 by John Zukowski Originally published by Apress

More information

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC). The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness The Abstract Windowing Toolkit (AWT) was part of the JDK form the beginning,

More information

CS111: PROGRAMMING LANGUAGE II

CS111: PROGRAMMING LANGUAGE II CS111: PROGRAMMING LANGUAGE II Computer Science Department Lecture 10(b): Working with Controls Agenda 2 Case study: TextFields and Labels Combo Boxes buttons List manipulation Radio buttons and checkboxes

More information

CSE 331. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

CSE 331. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT 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. Reges, D. Notkin, R. Mercer, Wikipedia http://www.cs.washington.edu/331/

More information

JTcl and Swank. Bruce A. Johnson, Tom Poindexter, & Dan Bodoh. What s new with Tcl and Tk on the JVM. Wednesday, October 26, 11

JTcl and Swank. Bruce A. Johnson, Tom Poindexter, & Dan Bodoh. What s new with Tcl and Tk on the JVM. Wednesday, October 26, 11 JTcl and Swank What s new with Tcl and Tk on the JVM Bruce A. Johnson, Tom Poindexter, & Dan Bodoh JTcl and Swank Bruce s Motivation Cross-platform, scriptable, desktop applications for analyzing and visualizing

More information

Advanced Java Programming. Swing. Introduction to Swing. Swing libraries. Eran Werner, Tel-Aviv University Summer, 2005

Advanced Java Programming. Swing. Introduction to Swing. Swing libraries. Eran Werner, Tel-Aviv University Summer, 2005 Advanced Java Programming Swing Eran Werner, Tel-Aviv University Summer, 2005 19 May 2005 Advanced Java Programming, Summer 2005 1 Introduction to Swing The Swing package is part of the Java Foundation

More information

Announcements. Introduction. Lecture 18 Java Graphics and GUIs. Announcements. CSE 331 Software Design and Implementation

Announcements. Introduction. Lecture 18 Java Graphics and GUIs. Announcements. CSE 331 Software Design and Implementation CSE 331 Software Design and Implementation Lecture 18 Java Graphics and GUIs Announcements Leah Perlmutter / Summer 2018 Announcements Quiz 6 due Thursday 8/2 Homework 7 due Thursday 8/2 Regression testing

More information

WIMP Elements. GUI goo. What is WIMP?

WIMP Elements. GUI goo. What is WIMP? WIMP Elements GUI goo What is WIMP? 1 There are many kinds of WIMPs WIMP The GUI Interface Windows Icons Menus Pointers 2 Windows Icons Pointers Menus Windows Windows are areas of the screen that act like

More information

Contents Introduction 1

Contents Introduction 1 SELF-STUDY iii Introduction 1 Course Purpose... 1 Course Goals...1 Exercises... 2 Scenario-Based Learning... 3 Multimedia Overview... 3 Assessment... 3 Hardware and Software Requirements... 4 Chapter 1

More information

CSE 331. Event- driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

CSE 331. Event- driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT CSE 331 Event- driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT Lecturer: Michael Hotan slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer,

More information

Rizvi College of Arts, Science & Commerce Bandra (W), Mumbai Teaching Plan Academic Year

Rizvi College of Arts, Science & Commerce Bandra (W), Mumbai Teaching Plan Academic Year Academic Year 17-18 Subject: ADVANCE JAVA Class : T.Y.B.Sc. (IT) DIV: Faculty: ARIF PATEL Months JUNE JULY AUGUST Topics to be covered Understanding Layout Manager. Swing: JColorChooser, JComboBox, JFileChooser,

More information

JBuilder 8.0 JFC and Swing Programming

JBuilder 8.0 JFC and Swing Programming TEAMFLY JBuilder 8.0 JFC and Swing Programming Chuck Easttom Wordware Publishing, Inc. Library of Congress Cataloging-in-Publication Data Easttom, Chuck. JBuilder 8.0 JFC and Swing programming / by Chuck

More information

Swing. Component overview. Java UI, summer semester 2017/2018 1

Swing. Component overview. Java UI, summer semester 2017/2018 1 Swing Component overview 1 Label class JLabel for displaying short text image both 2 Buttons many kinds of buttons all of them extends AbstractButton regular button (JButton) "click" button toggle button

More information

Part 3: Graphical User Interface (GUI) & Java Applets

Part 3: Graphical User Interface (GUI) & Java Applets 1,QWURGXFWLRQWR-DYD3URJUDPPLQJ (( Part 3: Graphical User Interface (GUI) & Java Applets EE905-GUI 7RSLFV Creating a Window Panels Event Handling Swing GUI Components ƒ Layout Management ƒ Text Field ƒ

More information

Packages: Putting Classes Together

Packages: Putting Classes Together Packages: Putting Classes Together 1 Introduction 2 The main feature of OOP is its ability to support the reuse of code: Extending the classes (via inheritance) Extending interfaces The features in basic

More information

Widgets. Overview. Widget. Widgets Widget toolkits Lightweight vs. heavyweight widgets Swing Widget Demo

Widgets. Overview. Widget. Widgets Widget toolkits Lightweight vs. heavyweight widgets Swing Widget Demo Widgets Overview Widgets Widget toolkits Lightweight vs. heavyweight widgets Swing Widget Demo Widget Widget is a generic name for parts of an interface that have their own behavior: buttons, progress

More information

Graphics. Lecture 18 COP 3252 Summer June 6, 2017

Graphics. Lecture 18 COP 3252 Summer June 6, 2017 Graphics Lecture 18 COP 3252 Summer 2017 June 6, 2017 Graphics classes In the original version of Java, graphics components were in the AWT library (Abstract Windows Toolkit) Was okay for developing simple

More information

Computer Science 210: Data Structures. Intro to Java Graphics

Computer Science 210: Data Structures. Intro to Java Graphics Computer Science 210: Data Structures Intro to Java Graphics Summary Today GUIs in Java using Swing in-class: a Scribbler program READING: browse Java online Docs, Swing tutorials GUIs in Java Java comes

More information

Publisher : O'Reilly Pub Date : November 2002 ISBN : Pages : 1278

Publisher : O'Reilly Pub Date : November 2002 ISBN : Pages : 1278 1 Table of Contents &"87%" class="t2" height="17">index &"87%" class="t2" height="17">reviews Examples Reader Reviews Errata Java Swing, 2nd Edition By Brian Cole, Robert Eckstein, James Elliott, Marc

More information

Learn Java Programming, Dr.Hashamdar. Getting Started with GUI Programming

Learn Java Programming, Dr.Hashamdar. Getting Started with GUI Programming Learn Java Programming, Dr.Hashamdar Getting Started with GUI Programming 1 Creating GUI Objects // Create a button with text OK JButton jbtok = new JButton("OK"); // Create a label with text "Enter your

More information

BASICS OF GRAPHICAL APPS

BASICS OF GRAPHICAL APPS CSC 2014 Java Bootcamp Lecture 7 GUI Design BASICS OF GRAPHICAL APPS 2 Graphical Applications So far we ve focused on command-line applications, which interact with the user using simple text prompts In

More information

GUI Basics. Object Orientated Programming in Java. Benjamin Kenwright

GUI Basics. Object Orientated Programming in Java. Benjamin Kenwright GUI Basics Object Orientated Programming in Java Benjamin Kenwright Outline Essential Graphical User Interface (GUI) Concepts Libraries, Implementation, Mechanics,.. Abstract Windowing Toolkit (AWT) Java

More information

Graphical User Interfaces (GUIs)

Graphical User Interfaces (GUIs) CMSC 132: Object-Oriented Programming II Graphical User Interfaces (GUIs) Department of Computer Science University of Maryland, College Park Model-View-Controller (MVC) Model for GUI programming (Xerox

More information

Java 1.9 Swing Index

Java 1.9 Swing Index One Introduction to Java 2 Usage of Java 3 Structure of Java 4 Flexibility of Java Programming 5 Swing and AWT in Java 6 Two Using Java in DOS 9 Using the DOS window 10 DOS Operating System Commands 11

More information

CSE 331 Software Design & Implementation

CSE 331 Software Design & Implementation CSE 331 Software Design & Implementation Kevin Zatloukal Fall 2017 Java GUIs (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Reminders HW8 due today Section tomorrow

More information

Java: Graphical User Interfaces (GUI)

Java: Graphical User Interfaces (GUI) Chair of Software Engineering Carlo A. Furia, Marco Piccioni, and Bertrand Meyer Java: Graphical User Interfaces (GUI) With material from Christoph Angerer The essence of the Java Graphics API Application

More information

2010 가을학기부산대학교정보컴퓨터공학부 OVERVIEW OF GUI PROGRAMMING

2010 가을학기부산대학교정보컴퓨터공학부 OVERVIEW OF GUI PROGRAMMING 2010 가을학기부산대학교정보컴퓨터공학부 OVERVIEW OF GUI PROGRAMMING Outline Graphic User Interface (GUI) Introduction AWT and Swing Graphics Programming Event Handling User Interface Components with Swing 2 Graphic User

More information

All the Swing components start with J. The hierarchy diagram is shown below. JComponent is the base class.

All the Swing components start with J. The hierarchy diagram is shown below. JComponent is the base class. Q1. If you add a component to the CENTER of a border layout, which directions will the component stretch? A1. The component will stretch both horizontally and vertically. It will occupy the whole space

More information

MODEL UPDATES MANIPULATES USER

MODEL UPDATES MANIPULATES USER 1) What do you mean by MVC architecture? Explain its role in modern applications and list its advantages(may-2013,jan-2013,nov-2011). In addition to dividing the application into three kinds of components,

More information

Graphical User Interface (GUI)

Graphical User Interface (GUI) Graphical User Interface (GUI) An example of Inheritance and Sub-Typing 1 Java GUI Portability Problem Java loves the idea that your code produces the same results on any machine The underlying hardware

More information

Java 1.8 Swing with Eclipse Oxygen Index

Java 1.8 Swing with Eclipse Oxygen Index One Introduction to Java 1 Usage of Java 2 Structure of Java 4 Flexibility of Java Programming 5 Using the Eclipse software 6 Swing and AWT in Java 7 Two Running Java in Eclipse 10 Introduction 11 Using

More information

Java 1.8 Swing with Eclipse Mars Index

Java 1.8 Swing with Eclipse Mars Index One Introduction to Java 1 Usage of Java 2 Structure of Java 4 Flexibility of Java Programming 5 Using the Eclipse software 6 Swing and AWT in Java 7 Two Running Java in Eclipse 10 Introduction 11 Using

More information

Java 1.8 Swing with Eclipse Neon Index

Java 1.8 Swing with Eclipse Neon Index One Introduction to Java 1 Usage of Java 2 Structure of Java 4 Flexibility of Java Programming 5 Using the Eclipse software 6 Swing and AWT in Java 7 Two Running Java in Eclipse 10 Introduction 11 Using

More information

Java 11 Swing with Eclipse Index

Java 11 Swing with Eclipse Index One Introduction to Java 1 Usage of Java 2 Structure of Java 4 Flexibility of Java Programming 5 Swing and AWT in Java 7 Using Eclipse 9 Two Dialog Boxes 10 Using Dialog Boxes 11 Using Message Dialogs

More information

Basics of programming 3. Java GUI and SWING

Basics of programming 3. Java GUI and SWING Basics of programming 3 Java GUI and SWING Complex widgets Basics of programming 3 BME IIT, Goldschmidt Balázs 2 Complex widgets JList elements can be selected from a list JComboBox drop down list with

More information

Java 11 Swing Index. Section Title Page

Java 11 Swing Index. Section Title Page One Introduction to Java 2 Usage of Java 3 Structure of Java 4 Flexibility of Java Programming 5 Swing and AWT in Java 6 Two Using Java in DOS 9 Using the DOS window 10 DOS Operating System Commands 11

More information

2110: GUIS: Graphical User Interfaces

2110: GUIS: Graphical User Interfaces 2110: GUIS: Graphical User Interfaces Their mouse had a mean time between failure of a week it would jam up irreparably, or... jam up on the table--... It had a flimsy cord whose wires would break. Steve

More information

core 2 Basic Swing GUI Controls in Java 2

core 2 Basic Swing GUI Controls in Java 2 core Web programming Basic Swing GUI Controls in Java 2 1 2001-2003 Marty Hall, Larry Brown http:// Agenda New features Basic approach Summary of Swing components Starting points JApplet, JFrame Swing

More information

core programming Basic Swing GUI Controls in Java Marty Hall, Larry Brown

core programming Basic Swing GUI Controls in Java Marty Hall, Larry Brown core programming Basic Swing GUI Controls in Java 2 1 2001-2003 Marty Hall, Larry Brown http:// Agenda New features Basic approach Summary of Swing components Starting points JApplet, JFrame Swing equivalent

More information

GUI Design. Overview of Part 1 of the Course. Overview of Java GUI Programming

GUI Design. Overview of Part 1 of the Course. Overview of Java GUI Programming GUI Design Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@imap.pitt.edu http://www.sis.pitt.edu /~spring Overview of Part 1 of the Course Demystifying

More information

Java Swing. based on slides by: Walter Milner. Java Swing Walter Milner 2005: Slide 1

Java Swing. based on slides by: Walter Milner. Java Swing Walter Milner 2005: Slide 1 Java Swing based on slides by: Walter Milner Java Swing Walter Milner 2005: Slide 1 What is Swing? A group of 14 packages to do with the UI 451 classes as at 1.4 (!) Part of JFC Java Foundation Classes

More information

Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008

Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008 Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008 Announcements A3 is up, due Friday, Oct 10 Prelim 1 scheduled for Oct 16 if you have a conflict, let us know now 2 Interactive

More information

Index SELF-STUDY. Symbols

Index SELF-STUDY. Symbols SELF-STUDY 393 Index Symbols -... 239 "Event-to-property"... 144 "Faux" variables... 70 %... 239 ( )... 239 (Pme) paradigm... 14 *... 239 +... 239 /... 239 =... 239 = Null... 46 A A project... 24-25, 35

More information

Containers. Atomic Components. Containment Hierarchy. Example Example 3.3 (revisited) Example DemoSwing.java

Containers. Atomic Components. Containment Hierarchy. Example Example 3.3 (revisited) Example DemoSwing.java Atomic Components Containers An atomic component is: a low-level entity an entity that interacts with the user an entity that cannot hold other components Examples: buttons (), text fields (JTextField)

More information

CS410G: GUI Programming. The Model/View/Controller Pattern. Model. Controller. View. MVC is a popular architecture for building GUIs

CS410G: GUI Programming. The Model/View/Controller Pattern. Model. Controller. View. MVC is a popular architecture for building GUIs CS410G: GUI Programming The Model/View/Controller design pattern provides a clean distinction between the your application s data (model), your GUI (view), and the how they interact (controller). Many

More information

user-friendly and easy to use.

user-friendly and easy to use. Java Graphic User Interface GUI Basic Dr. Umaporn Supasitthimethee Computer Programming II -2- Java GUI A graphical user interface (GUI) makes a system user-friendly and easy to use. Creating a GUI requires

More information

Java Swing. Lists Trees Tables Styled Text Components Progress Indicators Component Organizers

Java Swing. Lists Trees Tables Styled Text Components Progress Indicators Component Organizers Course Name: Advanced Java Lecture 19 Topics to be covered Java Swing Lists Trees Tables Styled Text Components Progress Indicators Component Organizers AWT to Swing AWT: Abstract Windowing Toolkit import

More information

CS 4300 Computer Graphics

CS 4300 Computer Graphics CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture 8 September 22, 2011 GUIs GUIs in modern operating systems cross-platform GUI frameworks common GUI widgets event-driven programming Model-View-Controller

More information

GUI Components Continued EECS 448

GUI Components Continued EECS 448 GUI Components Continued EECS 448 Lab Assignment In this lab you will create a simple text editor application in order to learn new GUI design concepts This text editor will be able to load and save text

More information

Top-Level Containers

Top-Level Containers 1. Swing Containers Swing containers can be classified into three main categories: Top-level containers: JFrame, JWindow, and JDialog General-purpose containers: JPanel, JScrollPane,JToolBar,JSplitPane,

More information

Lab 4. D0010E Object-Oriented Programming and Design. Today s lecture. GUI programming in

Lab 4. D0010E Object-Oriented Programming and Design. Today s lecture. GUI programming in Lab 4 D0010E Object-Oriented Programming and Design Lecture 9 Lab 4: You will implement a game that can be played over the Internet. The networking part has already been written. Among other things, the

More information

Graphical User Interfaces

Graphical User Interfaces Graphical User Interfaces Java Programming (Languages in Depth Series) Christoph Angerer April 26th 2007 Why Java UI Programming is Special Platform independence ( write once runs anywhere ): Windows,

More information

Control Flow: Overview CSE3461. An Example of Sequential Control. Control Flow: Revisited. Control Flow Paradigms: Reacting to the User

Control Flow: Overview CSE3461. An Example of Sequential Control. Control Flow: Revisited. Control Flow Paradigms: Reacting to the User CSE3461 Control Flow Paradigms: Reacting to the User Control Flow: Overview Definition of control flow: The sequence of execution of instructions in a program. Control flow is determined at run time by

More information

CPS122 Lecture: Graphical User Interfaces and Event-Driven Programming

CPS122 Lecture: Graphical User Interfaces and Event-Driven Programming CPS122 Lecture: Graphical User Interfaces and Event-Driven Programming Objectives: Last revised 1/15/10 1. To introduce the notion of a component and some basic Swing components (JLabel, JTextField, JTextArea,

More information

Visit for more.

Visit  for more. Chapter 3: Getting Started with JAVA IDE Programming Informatics Practices Class XI (CBSE Board) Revised as per CBSE Curriculum 2015 Visit www.ip4you.blogspot.com for more. Authored By:- Rajesh Kumar Mishra,

More information

Event Driven Programming

Event Driven Programming Event Driven Programming Part 1 Introduction Chapter 12 CS 2334 University of Oklahoma Brian F. Veale 1 Graphical User Interfaces So far, we have only dealt with console-based programs Run from the console

More information

Widget. Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down

Widget. Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down Widgets Jeff Avery Widget Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down menus, spinners, file dialog boxes, etc are

More information

1.00 Lecture 14. Lecture Preview

1.00 Lecture 14. Lecture Preview 1.00 Lecture 14 Introduction to the Swing Toolkit Lecture Preview Over the next 5 lectures, we will introduce you to the techniques necessary to build graphic user interfaces for your applications. Lecture

More information

Graphical User Interfaces. Swing. Jose Jesus García Rueda

Graphical User Interfaces. Swing. Jose Jesus García Rueda Graphical User Interfaces. Swing Jose Jesus García Rueda Introduction What are the GUIs? Well known examples Basic concepts Graphical application. Containers. Actions. Events. Graphical elements: Menu

More information

Class 14: Introduction to the Swing Toolkit

Class 14: Introduction to the Swing Toolkit Introduction to Computation and Problem Solving Class 14: Introduction to the Swing Toolkit Prof. Steven R. Lerman and Dr. V. Judson Harward 1 Class Preview Over the next 5 lectures, we will introduce

More information

Certified Eclipse Bundle

Certified Eclipse Bundle Certified Eclipse Bundle Turbo Professional Enterprise Integrated Installation >> Sample Applications >> Eclipse 3.3.2 (Europa) Framework with WTP 2.0, including: >> Business Intelligence and Reporting

More information

Object Oriented Programming

Object Oriented Programming Object Oriented Programming 1. Graphical User Interfaces OOP10 - M. Joldoş - T.U. Cluj 1 GUI A Graphical User Interface (GUI pronounced "goo-ee") presents a userfriendly mechanism for interacting with

More information

Window Interfaces Using Swing Objects

Window Interfaces Using Swing Objects Chapter 12 Window Interfaces Using Swing Objects Event-Driven Programming and GUIs Swing Basics and a Simple Demo Program Layout Managers Buttons and Action Listeners Container Classes Text I/O for GUIs

More information

GUI Programming. Chapter. A Fresh Graduate s Guide to Software Development Tools and Technologies

GUI Programming. Chapter. A Fresh Graduate s Guide to Software Development Tools and Technologies A Fresh Graduate s Guide to Software Development Tools and Technologies Chapter 12 GUI Programming CHAPTER AUTHORS Ang Ming You Ching Sieh Yuan Francis Tam Pua Xuan Zhan Software Development Tools and

More information

Certified Eclipse Bundle

Certified Eclipse Bundle Certified Eclipse Bundle Turbo Professional Enterprise Integrated Installation Sample Applications Eclipse 3.3.2 (Europa) Framework with WTP 2.0, including: Business Intelligence and Reporting Tools (BIRT)

More information

INTRODUCTION TO (GUIS)

INTRODUCTION TO (GUIS) INTRODUCTION TO GRAPHICAL USER INTERFACES (GUIS) Lecture 10 CS2110 Fall 2009 Announcements 2 A3 will be posted shortly, please start early Prelim 1: Thursday October 14, Uris Hall G01 We do NOT have any

More information

Graphical User Interfaces. Comp 152

Graphical User Interfaces. Comp 152 Graphical User Interfaces Comp 152 Procedural programming Execute line of code at a time Allowing for selection and repetition Call one function and then another. Can trace program execution on paper from

More information

SD Module-1 Advanced JAVA

SD Module-1 Advanced JAVA Assignment No. 4 SD Module-1 Advanced JAVA R C (4) V T Total (10) Dated Sign Title: Transform the above system from command line system to GUI based application Problem Definition: Write a Java program

More information

Human-Computer Interaction IS4300

Human-Computer Interaction IS4300 Human-Computer Interaction IS4300 1 Quiz 3 1 I5 due next class Your mission in this exercise is to implement a very simple Java painting applet. The applet must support the following functions: Draw curves,

More information

Widgets. Widgets Widget Toolkits. 2.3 Widgets 1

Widgets. Widgets Widget Toolkits. 2.3 Widgets 1 Widgets Widgets Widget Toolkits 2.3 Widgets 1 User Interface Widget Widget is a generic name for parts of an interface that have their own behavior: buttons, drop-down menus, spinners, file dialog boxes,

More information

SD Module-1 Advanced JAVA. Assignment No. 4

SD Module-1 Advanced JAVA. Assignment No. 4 SD Module-1 Advanced JAVA Assignment No. 4 Title :- Transform the above system from command line system to GUI based application Problem Definition: Write a Java program with the help of GUI based Application

More information

Discipline : MCA. Semester : IV. Subject : Advanced Java Programming. Lesson Plan Duration : 15 weeks (from January 2018 to April 2018)

Discipline : MCA. Semester : IV. Subject : Advanced Java Programming. Lesson Plan Duration : 15 weeks (from January 2018 to April 2018) Name of the Faculty : Ms. Urvija Raina Discipline : MCA Semester : IV Subject : Advanced Java Programming Lesson Plan Duration : 15 weeks (from January 2018 to April 2018) Work Load (/ ) per week(in hours)

More information

Better GUI Controls Originals of Slides and Source Code for Examples:

Better GUI Controls Originals of Slides and Source Code for Examples: 2010 Marty Hall Basic Swing Better GUI Controls Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/java5.html 2 Customized Java EE Training: http://courses.coreservlets.com/

More information

Week Chapter Assignment SD Technology Standards. 1,2, Review Knowledge Check JP3.1. Program 5.1. Program 5.1. Program 5.2. Program 5.2. Program 5.

Week Chapter Assignment SD Technology Standards. 1,2, Review Knowledge Check JP3.1. Program 5.1. Program 5.1. Program 5.2. Program 5.2. Program 5. Week Chapter Assignment SD Technology Standards 1,2, Review JP3.1 Review exercises Debugging Exercises 3,4 Arrays, loops and layout managers. (5) Create and implement an external class Write code to create

More information

CSE 1325 Project Description

CSE 1325 Project Description CSE 1325 Summer 2016 Object-Oriented and Event-driven Programming (Using Java) Instructor: Soumyava Das Graphical User Interface (GUI), Event Listeners and Handlers Project IV Assigned On: 07/28/2016 Due

More information

Graphical interfaces & event-driven programming

Graphical interfaces & event-driven programming Graphical interfaces & event-driven programming Lecture 12 of TDA 540 (Objektorienterad Programmering) Carlo A. Furia Alex Gerdes Chalmers University of Technology Gothenburg University Fall 2017 Pop quiz!

More information

Outline. Topic 9: Swing. GUIs Up to now: line-by-line programs: computer displays text user types text AWT. A. Basics

Outline. Topic 9: Swing. GUIs Up to now: line-by-line programs: computer displays text user types text AWT. A. Basics Topic 9: Swing Outline Swing = Java's GUI library Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Assignment 7: Expand moving shapes from Assignment 4 into game. "Programming

More information

Topic 9: Swing. Swing is a BIG library Goal: cover basics give you concepts & tools for learning more

Topic 9: Swing. Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Swing = Java's GUI library Topic 9: Swing Swing is a BIG library Goal: cover basics give you concepts & tools for learning more Assignment 5: Will be an open-ended Swing project. "Programming Contest"

More information