Introduction

A brief introduction to what you’ll learn in this course and the prerequisites required for this course.

Prerequisites

This course assumes that you already know about the following basic Java programming tasks:

  • Create a Java class.
  • Inherit from a superclass (extend another class).
  • Add projects to the build path.
  • Create a main() method and one or more constructors.
  • Import other classes.
  • Create and use variables: String, int, double, char, and boolean.
  • Create and use instance variables: private, public, protected, static, and/or final.
  • Create and use methods: private, public, protected, static, with or without parameters, and with or without a return value.
  • Use if/else statements and switch statements.
  • Use while loops and for loops.
  • Use the not operator, logical AND operator, and logical OR operator.
  • Add, subtract, multiply, and divide numbers.
  • Change the order of operations using parentheses.
  • Convert a string value to an integer value.
  • Convert an integer or character value to a string value.
  • Use try/catch blocks to handle one or more exceptions.
  • Use different string methods.
  • Use the Random class to generate a random number.
  • Add comments.
  • Print to the output console.
  • Use arrays and ArrayLists.
  • Read from and write to a file.
  • End a program using System’s exit() method.
  • Locate and fix syntax errors and runtime errors.

This course is definitely feasible for you if you have the above knowledge, but in case you do not, there is no need to worry - we have you covered. You can learn it from our other Java courses.

What will you learn in the course?

With your background and experience in java, you should be ready for the next level of programming: Java graphics and event-driven programming. Java graphics add color and images to games. But what is event-driven programming?

An event-driven program creates an initial screen, then waits for the program to take action. The user may click a button, click on an image, drag something, or press a key on the keyboard. The program then responds to that action, whatever that action may be. Writing such a program is called event-driven programming.

One could say that event-driven programming is user-interaction programming.

We will explore event-driven programming by developing ten games with a variety of features. Further details will be revealed in the upcoming lessons. These event-driven games will teach you how to respond to user input from:

  • Windows and dialogs
  • Buttons and input fields
  • Images and drawings
  • Keyboard input
  • Mouse clicks and drags

Learning outcomes of the course

After completing this course, you will be able to write code for a wide variety of features and actions. Some of those are:

  • Creating a window
  • Changing text size
  • Adding a scroll bar
  • Making clickable buttons
  • Changing button’s text and color upon click or other events
  • Drawing different shapes
  • Moving shapes on the screen with arrow keys
  • Showing message or confirm dialogs
  • Dividing images into sub-images and scrambling them
  • Creating dice with the help of shapes and colors
  • Creating a menu bar for features like selecting images from user files
  • Displaying only specific kinds of images from user files
  • Checking whether a word is in a file or not
  • Scaling images
  • Cropping images
  • Resizing images.
  • Dragging items and dropping them somewhere else on the screen.

You will learn all these concepts by implementing and practicing them in code.