Creating a GUI

Hello all, I have been working on a simple card game and am ready to start implementing the GUI. (right now I have been using text to the console) What would you recommend I use to implement a GUI? Should I just use something like Slick2D? Any help would be appreciated.

I highly suggest you don’t use slick2d. Instead use LibGDX or just make one yourself in Java2D. It sounds like you are already using Java2D so try making your own. I suggest to move on to LibGDX or some up to date library/binding. LWJGL, JOGL, and as I said, LibGDX are good examples.

All I have been using so far is LWJGL. Why do you recommend LibGDX?

Slick2D is fine, its not updated much anymore because its pretty stable last this point. OP, start with the basis and work your way up. First draw a square, then a textured square… Then different shapes etc… LibGDX is a complete graphics library built on LWJGL. I personally like bare LWJGL, and I use my personal library to perform some higher level functions. You could also look at Java2D.

Libgdx has just about everything you need out of the box such as GUI lib. It is easy to use and can really help streamline game dev. If you are more into writing everything yourself, then go for making a small UI lib. It can be fun. However, if you really want to just focus on game dev, then I strongly recommend libgdx.

I might go ahead and do it first in java 2d, then switch over to something else later.

It’s not worth it to do it in Java2D. I started learning OpenGL two years ago, and the last time I touched Java2D for a game project was before that. Its just not that useful.

Every java-programmer should have worked with Java2D once :cranky:. ;D
Java2d offers some great already written stuff and it’s may not made for writing action games, but in some cases it’s usefull and quite powerfull. We are even using swing in our editor that is build on top of libgdx.
Afterwards I would go for libgdx because you can nearly do all lwjgl stuff with libgdx and much more(android + ios + html). It also has some other great utils, like the FileHandle, Json, etc.

Well yes, Java2D is quite good for things other than game development. I actually do love it for GUIs, and I would pick it over a lot of other libraries simply because it is so easy to use, especially when you combine it with this visual plugin for Eclipse that allows you to drag and drop components, and it codes it for you.

Java2D/Swing is good for applications.

OpenGL is good for games.

OpenGL can be used for applications, and will be faster, but you need to write a lot of extra code beforehand. However, you don’t really need the speed in the first place.

Java2D can be used for games, but will be slower.

Start with Java2d and when you are satisfied that you can’t go further use openGL
using OpenGL now might confuse you and make you simply just quit on the game, since you wont be familiar with the library

So I started perusing the LIBGDX docs and watching some tutorials online and it seems pretty straight forward and easy. I might go ahead and start using it instead of Java2d.

Although I don’t love LibGDX for reasons I’ll withhold, I do say that I think you made a good choice. Java2D just isn’t cut out for game development, and it’s silly to use it when we have the awesome power of low level OpenGL ready for our use.
Good luck!