Java Swing GUI Basics – Java Game Dev #8

In this tutorial, we build our first JFrame and JPanel which are core components build into the Java Swing library. These allow us to set up some foundations for building our game up in the future. The JPanel has a paintComponent method which we will use for drawing 2d graphics.

We highly suggest you leave us any comments or feedback that would aid in bettering the production of these tutorials. Additionally, subscribing to us will help us to better engage you (the audience) such that we can improve our tutorials even further!

game development in c++
game development for beginners
game development time lapse
game development in Java/LibGDX
game development in unreal engine
game development behind the scenes
game development for android
game development for HTML5
Difficulty Levels: Beginner, Intermediate, Advanced

Please Consider Supporting This Channel via Subscribing:

— Extra Content I Suggest —

Book: “Clean Code” – Robert C. Martin –

Sign Up for Monthly (non-spam) updates:
Support Us:
Follow me on Twitter:

#programming #code #gamedev






5 responses to “Java Swing GUI Basics – Java Game Dev #8”

  1. wimpy kid Avatar

    thanks for your help you definitely deserve it

  2. Onur Safran Avatar

    You made me cry.. i was exactly looking for this

  3. Yongze Yao Avatar

    I am just curious about what the setMinimizedSize method does. Since you can still resize the window without it.

  4. MrMegaPokemasta Avatar

    definitely deserve more views, keep up the work!

  5. DevFactor Avatar

    Hey guys, so I struggled for a few minutes to find the correct method I was looking for. setPrefferedSize() is what we are looking for to give the GUI panel a starting size.

    There are a number of size methods inside of the JPanel object, but some seem not to work. Others seem to have similar confusions on stack overflow. I'd love to know what setSize() is intended to do if any of you know!

    Source Code: github/DFSource/jracer

Leave a Reply

Your email address will not be published. Required fields are marked *