Java: Graphical User Interfaces

Chapter One considers some of the classes of the java.io package. Java defines input and output (I/O) in terms of classes known as streams. Streams provide system input and output in a way that isolates the developer from the details about how an operating system provides access to system resources for the purposes of ...
3MB Sizes 1 Downloads 184 Views
David Etheridge

Java: Graphical User Interfaces – An Introduction to Java Programming

2 Download free eBooks at bookboon.com

Java: Graphical User Interfaces – An Introduction to Java Programming © 2009 David Etheridge & Ventus Publishing ApS ISBN 978-87-7681-496-0

3 Download free eBooks at bookboon.com

Contents

Java: Graphical User Interfaces

Contents 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7

The Input/Output Package An Introduction to Streams Categories of Streams and their Classes Using Streams Object Streams Files and File I/O Data Streams Summary of Streams

6 7 7 11 19 21 25 27

2. 2.1 2.2 2.3 2.4 2.5 2.6 2.7

Collecting Data II The Java Collections Framework The Core Collection Interfaces Implementation Types Operations, Methods, Iterators and Algorithms Generics and the Collections Framework Collections in the Themed Application Summary of the Java Collections Framework

28 28 28 31 34 36 42 46

360° thinking

360° thinking

.

.

360° thinking

.

Discover the truth at www.deloitte.ca/careers

© Deloitte & Touche LLP and affiliated entities.

Discover the truth at www.deloitte.ca/careers

© Deloitte & Touche LLP and affiliated entities.

4

© Deloitte & Touche LLP and affiliated entities.

Discover the truth at www.deloitte.ca/careers Click on the ad to read more Download free eBooks at bookboon.com

© Deloitte & Touche LLP and affiliated entities.

D

Contents

Java: Graphical User Interfaces

3. 3.1 3.2 3.3 3.4 3.5 3.6 3.7

User Interfaces What is a User Interface? Client/Server Applications The Construction of User Interfaces A Visual Approach to GUI Design Activating User Interface Components The GUI for the Themed Application Summary of Event Handling

47 47 49 50 64 68 83 87

4. 4.1 4.2 4.3 4.4

Concurrency with Threads An Introduction to Threads Creating Threads Using Threads in Java Applications Summary of Threads

90 90 91 93 100 NY026057B

TMP PRODUCTION 6x4

4

12/13/2013

ACCCTR0

PSTANKIE

gl/rv/rv/baf

Bookboon Ad Creative

All rights reserved.

© 2013 Accenture.

Bring your talent and passion to a global organization at the forefront of business, technology and innovation. Discover how great you can be. Visit accenture.com/bookboon

5 Download free eBooks at bookboon.com

Click on the ad to read more

The Input/Output Package

Java: Graphical User Interfaces

1. The Input/Output Package Chapter One considers some of the classes of the java.io package. Java defines input and output (I/O) in terms of classes known as streams. Streams provide system input and output in a way that isolates the developer from the details about how an operating system provides access to system resources for the purposes of I/O. Streams are not required for input and output when a graphical user interface (GUI) is used to capture and display information in an application. Graphical user interface design is examined in Chapter Three. There are approximately 60 classes in the java.io package. Consequently, this guide does not aim to cover every stream class. Instead, some of the main categories of streams are explained in general terms and examples are provided of the use of specific types of streams in a practical situation. The reader is referred to the java.io package of the API for the documentation associated with the many stream classes provided by the Java language.

The Wake the only emission we want to leave behind

.QYURGGF'PIKPGU/GFKWOURGGF'PIKPGU6WTDQEJCTIGTU2TQRGNNGTU2TQRWNUKQP2CEMCIG