Category Archives: Java Video Tutorial

Design Patterns Video Tutorial

Design Patterns Video TutorialHere I begin my design patterns video tutorial. I have talked a great deal about OOP design principles in the past. I’ve shown you how to turn requirements into a UML diagram. Then I covered how to turn a UML diagram into a class.

This tutorial will start off by revisiting OOP concepts. I’ll also provide answers to the most common questions I receive.

By the end, you’ll be able to use design patterns to solve common software design problems.

Continue reading Design Patterns Video Tutorial

Java Video Tutorial

Java Video TutorialA long time ago I started my Java Video tutorial. When I started this I wanted to completely cover the Java language. So, far I’ve recorded over 64 videos that are over 14 hours in total length.

I’m not near done with this tutorial, but I thought it would help if I combined all of these videos in just one post. Links to all of the code follows the videos. Videos on Android development, networking, design patterns and much more are still to come.

Continue reading Java Video Tutorial

Java Video Tutorial 60

Java Asteroids GameIn this video I continue my Java Asteroids game. I pretty much finish up the game in this tutorial.

I show you how to do a bunch of new things. I show you how to play sound in a JFrame. We introduce yet another way to handle collision detection. We remove items from the screen when they are destroyed. And, a whole bunch more is covered.

All of the code is available below and in this zipped archive.

Continue reading Java Video Tutorial 60

Java Video Tutorial 59

Java Asteroids Video GameIn the last part of this tutorial, I showed you how to make the PhotonTorpedo class using a UML class diagram.

In this tutorial, I show you how to make your space ship shoot the torpedos on the screen. As you’ll see, because I used good OOP design principles in the last video, adding the shooting feature will require very few changes.

All of the code follows the video. It is heavily commented to help you learn.

Continue reading Java Video Tutorial 59

Java Video Tutorial 58

Make an Asteroid Java GameAs we continue to make an asteroid Java game, I show you how to make your space ship shoot.

It sounds like a simple concept until you realize the ship is shooting while it is rotating through space at an angle that may not be equal to the direction it is moving. Don’t worry, we’ll figure it out together in this and the next tutorial.

Like always the code follows the video. I broke it up into separate pages per your requests 🙂

Continue reading Java Video Tutorial 58

Java Video Tutorial 57

Make a Java Asteroids GameIn this video I continue making a Java Asteroids game while teaching about OOP design principles. In previous videos I showed how to make a Java UML class diagram and then we turned the UML class diagram into a class.

Here I finish up the class so that you can now fly your ship in any direction. You’ll also be able to keep it on the game board and use life like velocity that accelerates.

All of the code is below and is heavily commented to help you learn.

Continue reading Java Video Tutorial 57

Java Video Tutorial 56

Java-Video-Tutorial-56In this part of my Java video tutorial I turn the SpaceShip UML class diagram I designed in the last video into a real class.

This class will allow you to fly the space ship around the screen at any angle. You’ll be able to rotate it while maintaining the ships current direction. It is considered to be a pretty complicated technique that is squeezed into a few lines 🙂

All of the code follows the video below to improve your learning experience.

Continue reading Java Video Tutorial 56

Java Video Tutorial 55

Java OOP Design PrinciplesIn this part of my Java video tutorial I focus on Java OOP Design Principles. We are still making the game we started in make a Java game, but now I’m creating all of the needed parts with strong use of encapsulation.

I walk you through the think process of going from features needed to a finished UML class diagram. I know this is an odd way to talk about OOP design principles, but I wanted to present it in a new fresh way.

What’s better than making a game while learning OOP?

Continue reading Java Video Tutorial 55

Java Collision Detection With Polygons

Java Collision Detection With PolygonsI’ve been asked many times to create a program that handles Java collision detection with polygons. This is a continuation of my tutorial on how to make a Java video game and if you haven’t been watching you should check it out.

It is surprisingly easy to handle collision detection with polygons. All you have to do is surround all of your polygons with rectangles and a handy dandy method named intersects handles pretty much everything else!

All the code follows the video.

Continue reading Java Collision Detection With Polygons

Java Video Tutorial 53

Rotate Polygons JavaI first started the how to make Java games series to solve a bunch of problems. Many people in the forms are posting extremely complicated ways to rotate polygons in Java for example. It is very easy to rotate polygons!

I also saw many people struggle with other calculations like: Finding the length and angle of a line between vectors / Calculate the points of a rotating polygon / Calculate the area of irregular polygons / Find the center points of an irregular polygon / Repeat keyboard clicks if the user holds down a key…

Continue reading Java Video Tutorial 53

Java Video Tutorial 52

Make a Java GameIn this part of my Java video tutorial, I create the spaceship object and a keyboard listener. I will use the keyboard listener to move the ship around the screen.

It is so easy to randomly add objects to the game we started making here Make a Java Video Game. I slowed things down a bit here, just to make sure you completely get the process.

All of the code is available under the video. Please feel free to ask questions.

Continue reading Java Video Tutorial 52

Java Video Tutorial 51

Java Animating SpritesHere I continue what I started in Make a Java Video Game. If you haven’t seen it, watch it before this video.

I’ll now create the GameBoard class that will animate all of my asteroids. I redraw the board using threads. If you are rusty on them, check out my Java Thread Video Tutorial.

The code follows the video and should be used to help you better learn this material.

Continue reading Java Video Tutorial 51

Java Video Tutorial 50

Make a Video Game JavaI wanted to make the 50th part of my Java Video Tutorial special! In this tutorial, I answer numerous questions.

I begin showing you how to design a game like Asteroids. I start teaching OOP design principles using UML. You learn how to draw polygons on the screen and how to animate them. And, to top it all off I show you how collision detection works.

Yes, there is a lot in this 14 minute video 🙂

Continue reading Java Video Tutorial 50

Java Video Tutorial 49

Make a Java Paint AppIn this part of my Java Video Tutorial, I continue to show you how to make a Java paint application. If you missed part 1 watch it.

I cover numerous topics including: how to draw lines, ellipses, brush strokes. I also cover how to save transparency values for shapes. And, because you requested it how to create a custom event listener and much more.

All of the code follows the video and it is heavily commented. After this tutorial, you’ll be able to make an app with much of the functionality of Photoshop.

Continue reading Java Video Tutorial 49

Java Video Tutorial 48

Make a Java Paint ApplicationThis tutorial is going to be a ton of fun. Today I’ll show you how to Make a Java Paint Application!

One of you guys asked me to do this and it gives me a great opportunity to review and cover new topics all at once. Somethings I cover that you may want to brush up on include using the Java Box Layout, Java ArrayList, and Java Graphics2D.

All of the code follows the video and it is heavily commented. If you have questions, feel free to ask. Everything used is here Zipped Archive

Continue reading Java Video Tutorial 48

Java Video Tutorial 47

Java 2D Graphics TutorialIn this part of my Java Video Tutorial, I cover how to draw 2D graphics in Java. This tutorial will serve as an introduction before I make a paint application with Java.

I cover drawing lines, curves, ellipses, rectangles and numerous other shapes. Then we look at strokes, fills and gradients.

All of the code follows the video and can serve as a cheat sheet, or an additional teaching tool.

Continue reading Java Video Tutorial 47

Java Video Tutorial 46

JDOM2 Video TutorialToday I introduce the easiest way to read and write to XML files using Java. It is call the JDOM2 library. With it you’ll easily read any element, or attribute and create your own.

I introduce 10 libraries and show you numerous methods that will make your life easier in just 14 minutes!

All of the code follows the video to improve the learning process.

Continue reading Java Video Tutorial 46

Java Video Tutorial 45

Java XPATH Video TutorialI received a bunch of emails asking me to make a tutorial on Java XPath. I guess you liked my previous XML XPath tutorial?

XPath can be used to easily grab data from an XML file and into your Java code. I’ll cover how to write to an XML file the easy way in my next tutorial on JDOM2.

All of the code follows the video, and it is heavily commented to help you learn.

Continue reading Java Video Tutorial 45

Java Video Tutorial 43

Java Server Pages Video TutorialHere is part 1 of my Java Server Pages video tutorial. To completely understand everything you need to see my Java Servlet Video Tutorial.

Unlike Java Servlets a JSP file allows you to easily co-mingle HTML, JavaScript and Java code all in one file. You do that by placing different types of Java code in special brackets.

It sounds harder than it is and after this video you’ll be writing your own JSPs. The code follows the video to help you learn.

Continue reading Java Video Tutorial 43

Java Video Tutorial 42

Java ServletsIn this part of my Java Video Tutorial, I continue what I started in my Java Servlet Video Tutorial. If you haven’t seen it, you need to before you can try this code out.

I’ll show you how to pass form data to a Java Servlet using both the GET and POST method. I also cover the web.xml file and much more.

The code follows the video, to help you learn. Also vote on what my next tutorial should be on below.

Continue reading Java Video Tutorial 42