Since you know Java, go to the Java API read up on the Canvas, JPanel, Graphics2D, BufferStrategy, System and Image Class. This is the starting point in learning 2D game programming. Any 2D game uses these classes all the time.
I tell you bits of information on what the above class is all about and I allow you to figure more details on your own. Understand the methods of the above classes.
Canvas- this is the canvas that will create the buffer strategies for you. Usually you will just need 2 buffer strategies.
JPanel-the canvas will be added onto here.
Graphics2D- this is the graphics context where all your game objects(any thing that shows up on the screen) is drawn here.
Bufferstrategy-it gets and shows you a buffer strategy as well as get the graphic context for you.
System- you will need this to keep track of the time of your game objects are loaded during the game and when it was drawn.
Image- you will need this along with the graphics context in order for your image to show up on the graphics context.
The concepts are a lot to take in so I recommend learning the concept at your own pace. But since you know Java, you should be able to understand it fairly well. Not only read but start applying these Java classes.
This is a good tutorial to start:
You can download all the code from the above website that is actually more involved but it actually gives you a holistic view of basic 2D game programming in a nutshell.