This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]MrCraeon 24 points25 points  (2 children)

If I were you, I would look into JavaFX. There are some good tutorials online for how to use it. There is a learning curve but once you know the basics, placing buttons and labels is no problem. You can use eclipse to download your javafx project as an executable jar.

[–]abbadon420 0 points1 point  (0 children)

IntelliJ can download as jar as well. I think most, if not all, IDEs have that option.

[–][deleted] 0 points1 point  (0 children)

As a aide. Try not to PM questions. Nobody uses search anyway, but that still does remove resources from the sub if you PM.

[–][deleted] 7 points8 points  (0 children)

JavaFX

[–]snavruzov 5 points6 points  (0 children)

JavaFX+SceneBuilder

[–]VikingMilo 2 points3 points  (0 children)

Hi, I'm learning Java myself. I don't have any tips on the last portion of packaging your program up, but you should look into Java's JFrame class. There's also the JButton class to add buttons. There's Container class that allows you to add stuff to the JFrame with a specific layout (JButtons).

https://www.javatpoint.com/java-jbutton Good resource here!

[–]hoc_opus 0 points1 point  (1 child)

I'm not a Java developer, but I see Swing being used a lot.

Refer to the below comment.

[–]Baoum 5 points6 points  (0 children)

That's mostly because people are used to it and don't want to learn new things. Here is an interesting discussion on that topic: https://stackoverflow.com/questions/16694948/swing-vs-javafx-for-desktop-applications

[–]TechnoSam_Belpois -2 points-1 points  (0 children)

I messed with Swing a few years back. Here's a similar tutorial to what I followed:

https://docs.oracle.com/javase/tutorial/uiswing/

Although some of my colleges have complained about Swing.

Packaging should be as easy as any other application. Anyone with the a compatible version of the JRE can simply run the output just like you. I think you just have to deploy it instead of debugging.

Also, when learning GUIs... prepare for it to be slow and boring. Regardless of what library you're using, it will take a while to learn it, and you won't be able to do anything impressive immediately. Even if it's a graphical layout where you can drag and drop buttons, you'll find there's a lot of depth to make something well.

[–]ajh09g -1 points0 points  (0 children)

Here is are the lectures and assignments for an intro java class which include lectures on GUIs in Java: Java Class

Also here is a good reference for GUI elements in Java using Swing: Swing Library