HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Java Tutorial 45 (GUI) - Moving Object with Keyboard Inputs (KeyListener)

115,019 views October 26, 2012 19:13

Watch on YouTube
ChannelJohn Gizdich

Description from the creator

In this tutorial, you will learn how to create a user controlled object. KeyListener is a must in games.

About this tutorial

John Gizdich published this 19:13 video tutorial on October 26, 2012. It has been watched 115,019 times on YouTube.

Category
Education
Duration
19:13
Published
October 26, 2012
Views
115,019
Likes
750

Tags

Share

Further reading

  • java - Moving a Rectangle using Keys - Code Review Stack Exchange codereview.stackexchange.com

    When I change those to 0 the object is stationary (as expected). But when I make it so they are initially 0 and when you press an arrow key the velocity changes, the object doesn't move. Any help? Here is my Main class,…

  • keyboard - Java object movement - Stack Overflow stackoverflow.com

    I am trying to get a circle to move through the input of a keyboard. I am not able to move the object at all. Can someone help me figure out what is wrong? Here is my code: import java.awt.Color; ...

  • SWING - KeyListener Interface - Tutorialspoint tutorialspoint.com

    The class which processes the KeyEvent should implement this interface. The object of that class must be registered with a component. The object can be registered using the addKeyListener() method. Interface Declaration…

This tutorial in other languages