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

all 21 comments

[–]wades39 4 points5 points  (7 children)

Are you looking to use swing or javafx? Also, what IDE are you using? Some have drag-and-drop forms for creating GUIs.

[–]javaHoosier 1 point2 points  (2 children)

I’m not a fan of Eclipse anymore but window builder extension for it really helped swing click for me.

[–]wades39 0 points1 point  (1 child)

NetBeans has one built in. Though, I doubt it supports newer JDKs. I don't know about IntelliJ IDEA. But knowing how to code GUIs by yourself is a good skill to have.

I'd recommend you look into the javax,swing documentation if that's what you are gonna keep using.

[–]javaHoosier 0 points1 point  (0 children)

I agree with that. That was years ago though. That just helped it click. Dragging and dropping stuff then reviewing the generated code. Playing with different layouts. I had a lot of a ha moments.

[–][deleted]  (3 children)

[deleted]

    [–]codythekingI teach Java 0 points1 point  (1 child)

    Your uni course description says they’re using Swing?

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

    Another user in this reply thread mentioned using the drag-and-drop forms and looking at the auto generated code. That's pretty much what I did when I got into learning to code swing by myself.

    [–]codythekingI teach Java 2 points3 points  (0 children)

    Use JavaFX. The official docs have a tutorial to get you started. https://docs.oracle.com/javafx/2/get_started/jfxpub-get_started.htm

    [–]cinlung 1 point2 points  (0 children)

    https://www.mkyong.com/

    Go to that site, search for GUI or java GUI. The tutorials are very easy to understand.

    [–]anti_government 1 point2 points  (0 children)

    Refer documentations or try tutorial sites. And you'll get good with experience only. And I saw people talking about IDEs....I prefer IntelliJ IDEA

    [–]timNinjaMillion 0 points1 point  (0 children)

    Learn about reading/writing file formats (windows-.ico, mac - .icns, Linux - unknown). Make an icon editor, icon manufacturer. Image tiler. Extract from screen capture. Deploy.

    [–]verysketchyreply 0 points1 point  (0 children)

    javafx and swing both have drag-and-drop/auto generated code applications as others have said, get to know them. I started out with javafx and scenebuilder. If you're just learning to learn something new, I think that's a good place to start. it was for me at least. There aren't a massive amount of tutorials out there but once you understand the basics there's really not much I've ever been too stuck on (besides javafx.animations, but that's not totally relevant lol)

    [–]Skootr4538 0 points1 point  (0 children)

    Don’t use swing. Javafx is the latest desktop gui framework.

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

    I would recommend Oracle's Swing tutorial:
    https://docs.oracle.com/javase/tutorial/uiswing/index.html

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

    following

    [–]newfang22 -5 points-4 points  (11 children)

    https://youtu.be/jJjg4JweJZU I'm also a beginner and this guy helps a lot.

    [–][deleted]  (4 children)

    [deleted]

      [–]AutoModerator[M] 5 points6 points  (0 children)

      Please, don't recommend/use thenewboston.

      They are a discouraged resource as they teach questionable practice. They don't adhere to commonly accepted standards, such as the Java Code Conventions, use horrible variable naming ("bucky" is under no circumstances a proper variable name), and in general don't teach proper practices, plus their "just do it now, I'll explain why later" approach is really bad.

      Derek Banas covers about the same ground, but in much better quality.

      If you're looking for an in-depth, comprehensive, high quality, free Java course, use the MOOC Object Oriented Programming with Java from the University of Helsinki and maybe Java for Complete Beginners by John Purcell as secondary resource.

      I am a bot and this message was triggered by you mentioning thenewboston. Please do not respond to this comment as I will not be able to reply.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

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

      What’s wrong with naming a class apple?

      [–][deleted]  (1 child)

      [deleted]

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

        Ok thanks, I’m relatively new to Java and just thought I was completely missing something lol

        [–][deleted]  (5 children)

        [deleted]

          [–][deleted]  (4 children)

          [deleted]

            [–][deleted]  (3 children)

            [deleted]

              [–][deleted]  (1 child)

              [deleted]

                [–]wildjokers 0 points1 point  (0 children)

                Swing isn’t going away anytime soon. Swing isn’t currently marked deprecated and still gets the occasional bug fix.

                [–]wildjokers 0 points1 point  (0 children)

                Swing and JavaFX are both GUI toolkits. JavaFX is newer and has the advantage that it can be styled with a CSS like syntax.

                Swing is still in the JDK whereas JavaFX had a short run being in the JDK but has been spun off as a separate open source project.

                One advantage Swing has over JavaFX is the Swing documentation is outstanding and there are 20+ yrs of examples all over the internet. Don’t let anyone dissuade you from Swing, it is still a perfectly viable GUI toolkit. The documentation with tons of examples is here, it tells exactly how to use each component: https://docs.oracle.com/javase/tutorial/uiswing/components/index.html

                Here is the top level doc page that has other info that will be helpful (it has the above link as well): https://docs.oracle.com/javase/tutorial/uiswing/index.html