Preview

AN INTRODUCTION TO JAVA PROGRAMMING

Good Essays
Open Document
Open Document
4571 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
AN INTRODUCTION TO JAVA PROGRAMMING
David Etheridge

Java: Graphical User Interfaces
– An Introduction to Java Programming

Download free eBooks at bookboon.com
2

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

Download free eBooks at bookboon.com
3

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

e Graduate Programme for Engineers and Geoscientists

I joined MITAS because
I wanted real responsibili

Maersk.com/Mitas

Real work
Internationa
al
International opportunities wo or ree work placements

Month 16
I was a construction supervisor in the North Sea advising and helping foremen he solve problems s Download free eBooks at bookboon.com
4

Click on the ad to read more

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

www.job.oticon.dk

Download free eBooks at

You May Also Find These Documents Helpful

  • Good Essays

    The graphical user interface of the software is to be designed with first priority as the…

    • 612 Words
    • 3 Pages
    Good Essays
  • Good Essays

    ECET 370 Week 5 Lab 5

    • 650 Words
    • 3 Pages

    Exercise 1: Review of the Lecture Content Create a project using the ArrayList class and the Main class provided in DocSharing. The ArrayList class contains implementations of the first three search methods explained in this week's lecture: sequential, sorted, and binary search. The Main class uses these three methods. These programs test the code discussed in the lecture. Compile the project, run it, and review the code that is given carefully.…

    • 650 Words
    • 3 Pages
    Good Essays
  • Better Essays

    Venit, S., & Drake, E. (2011). Prelude to Programming Concepts and Design (5th ed.). Boston, MA: Addison-Wesley.…

    • 1800 Words
    • 6 Pages
    Better Essays
  • Powerful Essays

    Searching and Sorting Streams and Files Graphics GUI Components and Events Mouse, Keyboard, Sounds, and Images Big-O Analysis of Algorithms The Java Collections Framework Lists and Iterators Stacks and Queues Recursion Revisited Binary Trees Lookup Tables and Hashing Heaps and Priority Queues Design Patterns…

    • 3908 Words
    • 16 Pages
    Powerful Essays
  • Good Essays

    Intro to programming

    • 534 Words
    • 3 Pages

    Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height.…

    • 534 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Java

    • 827 Words
    • 4 Pages

    9. The withholding tax on a weekly salary (let us assume) is computed as follows: 14% of the difference between a person's gross pay and $13 times the number of dependents he or she claims. Read the values for the gross pay and the number of dependents; print the withholding tax.…

    • 827 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Please write answers on a separate sheet of paper. YOU MUST STAPLE ALL PAPERS TOGETHER AND HAVE YOUR NAME AND CLASS SECTION INFORMATION ON EACH SHEET OF PAPER.…

    • 398 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    java answers

    • 15737 Words
    • 160 Pages

    Building Java Programs 2nd edition Exercise Solutions Chapter 1 Chapter 2 Chapter 3a Chapter 3 G Supplement Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 15 Chapter 16 Chapter 17 Chapter 1 Exercise 1.1: Stewie public class Stewie { public static void main(String[] args) { System.out.println("//////////////////////"); System.out.println("|| Victory is mine! ||"); System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"); } } Exercise 1.2: Spikey public class Spikey { public static void main(String[] args) { System.out.println(" \\/"); System.out.println(" \\\\//"); System.out.println("\\\\\\///"); System.out.println("///\\\\\\"); System.out.println(" //\\\\"); System.out.println(" /\\"); } } Exercise 1.3: WellFormed public class WellFormed { public static void main(String[] args) { System.out.println("A well-formed Java program has"); System.out.println("a main method with { and }"); System.out.println("braces."); System.out.println(); System.out.println("A System.out.println statement"); System.out.println("has ( and ) and usually a");…

    • 15737 Words
    • 160 Pages
    Powerful Essays
  • Satisfactory Essays

    Object Oriented Programming

    • 41750 Words
    • 167 Pages

    Ans: Class is a template for multiple objects with similar features and it is a blue print for objects. It defines a type of object according to the data the object can hold and the operations the object can perform. Constructor is a special kind of method that determines how an object is initialized when created.…

    • 41750 Words
    • 167 Pages
    Satisfactory Essays
  • Satisfactory Essays

    To understand the concept of a variable holding a value, how a variable is declared and how it can…

    • 516 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Java Project

    • 271 Words
    • 3 Pages

    Intend to build a career with leading corporate of hi-tech environment with committed & dedicated people, which will help me to explore myself fully and realize my potential.…

    • 271 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    * Software products may be developed for a particular customer or may be developed for a general market…

    • 1222 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    OCJA exam prep

    • 5816 Words
    • 24 Pages

    2. Which statement represents a valid statement that will allow for the inclusion of classes from the java.util package?…

    • 5816 Words
    • 24 Pages
    Satisfactory Essays
  • Powerful Essays

    This beginner’s guide is designed for people with little or no prior knowledge of computer languages, who want to learn to program by using the C# language. If you have some previous programming experience, maybe in another language or from a few years ago, then you may also find this guide useful. If you are a professional developer, or you are already skilled in one or two programming languages, then you will probably not have much to learn from this document.…

    • 5537 Words
    • 23 Pages
    Powerful Essays
  • Good Essays

    Introduction To JavaScript

    • 3905 Words
    • 44 Pages

    Introduction to JavaScript introduction What Web scripting is?  How scripting and programming are different (and similar)  What JavaScript is?    JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari.…

    • 3905 Words
    • 44 Pages
    Good Essays