How to Make Cookie Clicker (1/3) - Java GUI Game Programming -

How to Make Cookie Clicker (1/3) – Java GUI Game Programming

Views: 10836
Like: 158
From this video I will explain how to develop a simple Incremental game/idle game in Java.

If you have any questions, please feel free to comment. I would be happy to answer 🙂

Cookie Clicker:

[ Other Tutorials ]
How to Make a Simple Adventure Game on Android (Java/Kotlin)

Super Beginner’s Text Adventure Game Creation in Java

How to Make Text Adventure Game with GUI in Java

Java Game Development Extra

How to Make Notepad in Java

Dungeon Crawler RPG Development (Vlog)


  1. hey im trying to do this on netbeans rn, what's the imports that i need for the 2 handlers? like the mousehandler and cookie handler?

  2. If anyone runs into GridLayout not resolving as a type, make sure to add import java.awt.*; or java.awt.GridLayout at the top as it relies on this import

  3. Wait, it tells me i must have the CookieHandler class in it's own file. It worked for you! Why doesn't it work for me?

  4. If you are not familiar with how to make these window, panels, buttons etc… please check my previous tutorial series "How to make a text adventure game in GUI in Java". I have explained how to use Java Swing and create these objects:

  5. Idk why but I just dont understand all the tutorials on "getting started in making games" this helps alot

  6. From your accent, I assume you are japanese, but your vocabulary is incredibly refined. Good job, good tutorial, and you've gained a sub. ;]

  7. hello! I tried to follow the tutorial but my image is not showing up for the icon

  8. Naum ⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻⸻ says:


  9. Hi.
    First and foremost – Thank you for your effort. I am learning java since a few month and have strted to practise a little bit. So I tried to convert your methods to my game approach. With the following lone I get an error message: "ImageIcon officeDoor = new ImageIcon(getClass().getClassLoader().getResource("officeDoor.png"));"

    The file "officeDoor.png" is in the "res"-folder.

    Is the code is not restricted to eclipse, is it?
    I am familiarizing myself with IntelliJ, but that should not be an issue.

    Anyways, I do get a null pointer exception in the above mentioned line as follows:
    Exception in thread "main" java.lang.NullPointerException
    at java.desktop/javax.swing.ImageIcon.<init>(
    at TVGame.createUI(
    at TVGame.<init>(
    at TVGame.main(

    Without this line, the program runs smoothly, but I cannot figure out, why this line does not work.
    Please help =)

  10. Oh, I did figuer this out. "ImageIcon officeDoor = new ImageIcon("src/res/officeDoor.png");" – did work for me.

  11. im getting a error at 8:38 but the file name is correct and ive been trying to fix it for a hour pls help

  12. Can you send me the code only from this video? Its for school an the first video is enough

  13. why does it say that it doesnt have a main type when I try to run it

  14. 16:08 The type cookie.CookieHandler must implement the inherited abstract method ActionListener.actionPerformed(ActionEvent) error?
    Edit, i spelled performed wrong I'm dumb

Leave a Reply

Your email address will not be published.