Introduction to Java Applet Programming
Table of Contents
Course Overview
This course is a good first course for people interested in
learning to program with the emerging Java language. It covers
the basic syntax and structure of Java as well as exploring
the object-oriented nature of the language. This course is
focused on programming applets--the mini-programs written in Java
that can bring web pages to life. With applets, the course looks
at everything from simple graphics and buttons to form layout and
multi-threaded programs.
Course Objectives
By the end of the course, students will be able to:
- Write, Compile, and Execute Java Applets
- Include Java Applets on Web Pages
- Write Object Oriented programs with Classes, Methods, and Objects
- Design and Implement a Graphical User Interface in Java
- Use Java's Layout Managers
- Handle Events for User Interaction
- Trap Errors using Java Exceptions
- Access Network resourses including URLs and Images
Prerequisites
Some programming background is required. While any C or C++
experience will be beneficial, it is not required. No
object-oriented experience is required.
Course Series
This course is often taken as part of the following course sequence:
Introduction to Java Applet Programming
JDBC Database Programming (Coming Soon)
Course Topics
This course covers the following topics in a 3-day, lecture/lab
format:
- Introduction to Java
- Differences between C, C++, and Java
- Event Driven Programming
- Object Oriented Programming
- Using the Java Development Kit (JDK)
- The Application vs. Applet Distinction
- Applet Basics
- How to Include an Applet in an HTML Document
- Applet Structure
- Running an Applet from a Web Browser
- Java Language Syntax
- Displaying Output
- Variables
- Arrays
- Branching
- Loops
- Object Oriented Programming in Java
- Defining New Classes
- Defining New Methods
- Limiting Method Access
- Method Parameters
- Constructors
- Designing Graphical User Interfaces in Java
- Buttons
- Events
- Labels
- Choice Buttons
- Checkboxes
- Text Fields
- Lists
- Scrollbars
- GUI Layout in Java
- Panels
- Layout Managers
- FlowLayout
- GridLayout
- BorderLayout
- Handling Java Events
- Mouse Events
- Keyboard Events
- Exceptions in Java
- Error Handling with Exceptions
- Catching Exceptions
- Throwing Exceptions
- Creating Your Own Exceptions
- Network Access from Java
- Network Requirements
- Security Restrictions
- Accessing URLs
- Accessing Images
Two appendices include advanced material that may be covered depending
on student interest and background:
- Threads
- When to Use Multiple Threads
- Creating a Thread
- Runtime Control of Threads
- Stopping a Thread
- Waiting for a Thread
- Thread Priorities
- The GridBagLayout Manager
- What GridBagLayout Does
- Using GridBagConstraints