How to Build a Swing GUI with IntelliJ IDEA

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • In this video lesson, we create a celsius converter GUI app by adapting The Java Tutorials "Lesson: Learning Swing with the NetBeans IDE" for the Intelli J IDEA IDE.
    Source code available at: github.com/gsp...
    Check out my blog at ginasprint.com/

Комментарии • 112

  • @compartelo007
    @compartelo007 4 года назад +2

    I have a very low level of English, but thanks to the fact that you have explained this tutorial very clearly and slowly, I have been able to do it almost as if it were in my mother tongue.
    THANKS

  • @thejennyrenaissance577
    @thejennyrenaissance577 4 года назад +4

    You are an awesome teacher. I am learning java in a computer science program, and this week we are learning GUI programming. So, this was very helpful indeed! If you make anymore tutorials for java, I am now subscribed and will definitely watch them all. 🙏🏽

  • @shivam_patel
    @shivam_patel 3 года назад +7

    great tutorial! Didn't even realize that using IntelliJ requires some different steps than certain tutorials prescribe. Favorite part is at 8:11

  • @jowmind9277
    @jowmind9277 2 года назад +1

    Thank you soo much please didn’t stop making videos you are really a good teacher 👩‍🏫

  • @NoTengoTema
    @NoTengoTema Год назад +1

    Hello Gina. Your video is really good, thanks for sharing. I just watched your video because I have to make a project using Swing, and I wonder where the initialization of the variables is located, as in the source code I see the identifiers for the JPanel and JButton, but not the "new" for the initialization.

  • @db01brighton
    @db01brighton 3 года назад +1

    This is a brilliant video - much better than the resources on IntelliJ for JFrame!

  • @CHITUS
    @CHITUS 3 года назад +4

    Thank you very much for this simple yet amazing demonstration.

  • @brunofernandes6090
    @brunofernandes6090 3 года назад

    Ginaaaaa, thank you so much, you're the best!!! I was trying to make a simple "rule of three" app, and with your video, I was able to finish, thanks!

  • @mehlover
    @mehlover Год назад

    Thank you so much for this! Super helpful!

  • @dneilzbarn6273
    @dneilzbarn6273 3 года назад +3

    Hi miss,
    this is very helpful and your voice is so relaxing.

  • @TheManas1979
    @TheManas1979 5 лет назад +9

    Hi Gina, thank you very ,much for easy explanation.Greetings from Russia.

  • @Morax
    @Morax 4 года назад +1

    Your keyboard sounds amazing. Also thanks for the tutorial

    • @GinaSprint
      @GinaSprint  4 года назад

      Thanks, it's a macbook pro and I agree, I like the clicky sound it makes in the videos. Thanks for watching!

  • @khaledhisham3624
    @khaledhisham3624 4 года назад +1

    I didn't know how can I thank you
    I was searching about it for 2 days
    really take my heart I don't need it

    • @GinaSprint
      @GinaSprint  4 года назад

      Glad I could help! Let me know if there are other tutorials you'd like to see from my channel :)

  • @hannibalbianchi1466
    @hannibalbianchi1466 4 года назад

    It is preferable that the lecture be prepared before its explanation. Try not to move from one window to another during the explanation
    Your language is understandable to non-English speakers like me (Italian) Thank you
    More lessons we need :)

  • @shyamkumars.m2291
    @shyamkumars.m2291 3 года назад

    TYSM 🥰. I've been struggling for some days to make a GUI in IntelliJ

  • @acavals8080
    @acavals8080 4 года назад +8

    Sorry for this stupid question, but I really don`t understand how you got it running with JPanel variable not initialized... I got a "contentPane cannot be set to null" Exception.

    • @polymetric2614
      @polymetric2614 4 года назад

      IntelliJ's UI designer essentially creates extra "invisible" code below the main class that initializes all of those fields. Are you sure you clicked New -> Swing UI Designer -> GUI Form _instead_ of New -> Class?
      Also, this isn't important to the question, but I found it interesting that you can view this "invisible code" by going to File -> Settings -> GUI Designer -> Generate GUI into, and changing that from "Binary class files" to "Java source code."

    • @acavals8080
      @acavals8080 4 года назад

      @@polymetric2614 thanks a lot for your answer. I didn't have time to come and analyse this problem. But, I can see what you explain.

  • @kevinishki
    @kevinishki 2 года назад +1

    Mine give me the error "forms: Class to bind does not exist: mainPanel" the first time I try to run the program at 9:09

  • @darwincordova8241
    @darwincordova8241 2 года назад

    You are a very good teacher!

  • @MdSoleyman
    @MdSoleyman 4 года назад +1

    You deserve more subscribers, tysm ❤ from Bangladesh

  • @mwbgeometrydashpcaccount6372
    @mwbgeometrydashpcaccount6372 3 года назад

    YOU PUBLISHED THIS ON THE DAY GEOMETRY DASH TURNED 6!!!

  • @nobrainbro5297
    @nobrainbro5297 4 года назад +10

    Me to her Keyboard: Be strong, Life is hard hiting

  • @aborda6044
    @aborda6044 2 года назад

    this is so good, nice work

  • @dailychinese1396
    @dailychinese1396 Год назад

    Thanks for an amazing tutorial !!!!!

  • @ChrisInTheNorth
    @ChrisInTheNorth 4 года назад

    I really got something from this video, a couple of weeks ago.. I'm now ready for the next stage.. making a form that looks 'pretty' ot at least professional

  • @suadalive
    @suadalive 4 года назад

    Thank you ! I really had trouble with this feature but u helped me alot!! Thx again

  • @nicolasciarrapico5218
    @nicolasciarrapico5218 3 года назад

    Thx Gina. I love you

  • @simpilotadamt1012
    @simpilotadamt1012 3 года назад +1

    I'm ta 8:43 aand my code basically looks the same as it does on th video, but idea is telling me that there's an eror in the line where I pass the title to CelciusConverterGUI saying that it's expecting 0 parameters but is getting one???

    • @GinaSprint
      @GinaSprint  3 года назад +1

      Maybe try cleaning the project and re building ?

    • @simpilotadamt1012
      @simpilotadamt1012 3 года назад +1

      @@GinaSprint yeah I realised after a long think that I had named my GUI constructor slightly wrong. My typos are gonna be the end of me. Thanks for the video!

  • @TriangleLife__Raj_Mrittik
    @TriangleLife__Raj_Mrittik Год назад

    such a helpful video thank youu

  • @yosoyhelio
    @yosoyhelio 4 года назад

    Awesome, thanks! from costa rica, you help me a lot with this

    • @maikelgutierrez8558
      @maikelgutierrez8558 4 года назад +1

      Esta picha de IDE es una paridera con el diseño de GUI. El ide es monstruoso pero que lastima la mierda de diseñador que trae.

  • @johnmorrill5637
    @johnmorrill5637 3 года назад

    So, trying to follow this, I am immediately stopped at trying to add a form when the option "Swing UI Designer" is not selectable from my NEW option for a new src item. What can I be doing wrong already?

  • @henryhcc
    @henryhcc 2 года назад

    Great video. Thank you!

  • @l.aguirre5550
    @l.aguirre5550 4 года назад +2

    hola, como puedo mover libremente el boton en el formulario??????

  • @wojciech8985
    @wojciech8985 2 года назад

    Could you tell me how to change a width of columns? I've tried to do it by dragging arrows which are above panel but it doesnt work

  • @dannythomas4933
    @dannythomas4933 4 года назад +1

    Great tutorial👍

  • @alishbaarif9594
    @alishbaarif9594 3 года назад

    i created labels and text field but it is not showing in JFrame output
    however title run properly kindly guided me

  • @marone6611
    @marone6611 4 года назад +1

    I have a weird problem, even importing swing typing "import javax.swing.*" it doesn't import it, the whole phrase goes gray (similar to what happens to comments), and if I try to create jframes or panels etc, it gives me always red warnings

    • @alexanderbrown1578
      @alexanderbrown1578 4 года назад

      Same problem. Did you find a solution?

    • @marone6611
      @marone6611 4 года назад

      @@alexanderbrown1578 i found just that android doesn't use swing library. But there's to say that i setted intellij to develop apps (probably on android) following some tutorial, before i tryed to import swing so may be related to that

  • @trr1932
    @trr1932 4 года назад +2

    How to set the title? JFrame frame = new app( title: "xyz"); title: is red :(

  • @raketic5052
    @raketic5052 2 года назад

    This helped me so much

  • @raymondhill7837
    @raymondhill7837 3 года назад

    Do you not to run it inside the `EventQueue.InvokeLater(() -> {});` callback?

  • @lucianoarguello3283
    @lucianoarguello3283 4 года назад

    Thanks! Just what I needed

  • @howardchen5438
    @howardchen5438 3 года назад

    How to add JMenu from designer? Looks like there is no such JMenu .

  • @nomeacuerdoxd4481
    @nomeacuerdoxd4481 4 года назад

    ya lo voy viendo como 6 veces.. solo pro el sonido del teclado, es hermoso

  • @atharvsambarat7295
    @atharvsambarat7295 3 года назад

    Thank you so much for this!

  • @DavisTibbz
    @DavisTibbz 2 года назад

    TIP: in IntelliJ, just type main, then press Tab. To easily generate the full Java main method

  • @ngoanrazor
    @ngoanrazor 3 года назад

    Great tutorial

  • @poilingner5763
    @poilingner5763 4 года назад

    Thank you very much! Great video!

  • @anfacsomacademy3724
    @anfacsomacademy3724 4 года назад

    Thanks sis this was helpful!

  • @mbonuchinedu2420
    @mbonuchinedu2420 4 года назад

    Thanks Ginja.
    Do you have any videos on eclipse gui.
    Thanks love ❤️😘😘

    • @GinaSprint
      @GinaSprint  4 года назад

      I'm sorry, I don't! I used to use Eclipse but I instead now use IntelliJ, so I won't be making any Eclipse videos any time soon. Happy coding!

    • @mbonuchinedu2420
      @mbonuchinedu2420 4 года назад

      @@GinaSprint Thanks Ginja.

  • @adarshvaidya1827
    @adarshvaidya1827 3 года назад

    These are some timestamps I stopped the video to rewatch it and write the code alongside her
    3:32
    9:26
    12:47

  • @LeonardoGonzalez-xc4hz
    @LeonardoGonzalez-xc4hz 3 года назад

    Thank you so much I love you

  • @iagofelipe7374
    @iagofelipe7374 5 лет назад +1

    just in my intellij don't have the ''swing UI designer" part ?

    • @cagdasmuldur250
      @cagdasmuldur250 4 года назад +1

      It is probably about setting a source root in your project folder. Right-click the root folder your project is included in and select > mark directory as > Sources root. This might resolve it

    • @GinaSprint
      @GinaSprint  4 года назад

      @@cagdasmuldur250 Thank you for helping out Iago!

  • @mohammadhasnain4103
    @mohammadhasnain4103 4 года назад

    Such a great video
    Can you tell me how can I change the position of components because when I am draging them they come back to their original position.

  • @gagantechtechnical6737
    @gagantechtechnical6737 4 года назад

    Your awesome,tysm for the video!

  • @gyangaha109
    @gyangaha109 4 года назад

    Thanks. I love it.

  • @ravinduabeygunasekara833
    @ravinduabeygunasekara833 3 года назад

    great video. how can i make this stand-alone? I mean how to create an installation setup file for this?

    • @ayeshazaki3041
      @ayeshazaki3041 3 года назад

      And if you want to make a setup file for that exe use Inno
      Link: jrsoftware.org/isinfo.php

  • @tusharshivan9559
    @tusharshivan9559 2 года назад

    why use IntelliJ instead of Eclipse?

    • @GinaSprint
      @GinaSprint  2 года назад +1

      Hi there! IDE choice is often personal preference. IntelliJ is newer and has an easier to use interface. It is also distributed in different flavors like PyCharm, CLion, Android Studio, etc. so if you learn one you learn a family. Happy coding! -Gina

    • @tusharshivan9559
      @tusharshivan9559 2 года назад

      @@GinaSprint Great Advice Thanks!!!!. So would you recommend the paid version of IntelliJ or free one?

    • @GinaSprint
      @GinaSprint  2 года назад

      @@tusharshivan9559 Start with free community edition until you run into a feature you need with ultimate. Usually your company will pay for ultimate if it is needed.

    • @tusharshivan9559
      @tusharshivan9559 2 года назад

      @@GinaSprint Ok one last question, since IntelliJ is new, its support like community forums like Stackoverflow wouldn't be much compared to Eclipse. Right?

    • @GinaSprint
      @GinaSprint  2 года назад +1

      @@tusharshivan9559 That could be the case yes. I would still recommend learning IntelliJ over Eclipse because it is more popular right now. Anecdotally, I learned Java with Eclipse in 2010. I teach CS at the university level and I don't think I've heard anyone teaching Eclipse recently. It's mostly IntelliJ and VS Code. That is a sample size of 1 of course so ask some more folks about their thoughts on the subject :) Happy coding

  • @pjguitar15
    @pjguitar15 3 года назад

    Your audio volume is too loww but I appreciate the video a lottt!!!

    • @sandokanfirst2
      @sandokanfirst2 3 года назад

      What is "audio volume"? 😜 Anyway, I disagree - the audio is absolutely fine. I try to keep my volume at 75% and at this level it's perfectly audible!

  • @smwoSun
    @smwoSun 3 года назад

    really helpfull

  • @adeizayusuf
    @adeizayusuf 4 года назад

    Netbeans has the best GUI builder

  • @game-kh
    @game-kh 3 года назад

    thank you

  • @rovernant2440
    @rovernant2440 2 года назад

    thanks!

  • @jaimearmandoruiztrigueros9870
    @jaimearmandoruiztrigueros9870 3 года назад

    Thanks thanks.

  • @deya2nassar
    @deya2nassar 2 года назад +1

    Why Swing is such a pain in the ass in Intellij?!
    Every other IDE you just create a form and it populates the initial boilerplate code for you in the bound class and you're set to go on your main objective of actually creating a GUI.
    Creating a GUI with IntelliJ is so frustrating and tiring and it really pisses me off as a beginner programmer.
    Everything needs to be done from scratch in the bound class!
    Not only I don't know how to do that, but there's no freakin' documentation on their website or RUclips channel on how to do that!
    I'm really angry about this!

    • @GinaSprint
      @GinaSprint  2 года назад

      Perhaps start learning Swing without the GUI form editor... meaning do it all in Java. Understand that first then try the GUI form editor again. Happy learning and coding!

    • @deya2nassar
      @deya2nassar 2 года назад

      @@GinaSprint Excellent suggestion! Thank you for replying. That's exactly what I thought of and proceeded to do only to realize through my research that Swing is not the best path and that JavaFX is the future. So I guess I'll go with JavaFX now. Do you have an opinion about this debate?

    • @GinaSprint
      @GinaSprint  2 года назад

      @@deya2nassar Swing is old, I'd recommend learning something more modern. If you need to use Java then yes I'd agree go with JavaFX over Swing. Enjoy!

    • @deya2nassar
      @deya2nassar 2 года назад

      @@GinaSprint Thanks a lot. You're great.

  • @sweetgraphics
    @sweetgraphics 4 года назад

    JFrame frame = new JFrame(String.valueOf(new CelsiusConverterGUI("My Celsius Converter")));
    frame.setVisible(true);

  • @reviewdochoitreem
    @reviewdochoitreem 3 года назад

    Tks love you

  • @angelcastineira2561
    @angelcastineira2561 4 года назад

    Thanks!

  • @shamshurr
    @shamshurr 4 года назад

    Thats awsome

  • @ignacioarmandugon2916
    @ignacioarmandugon2916 3 года назад

    God I'm gonna miss windowsbuilder

  • @ahmadalghali90
    @ahmadalghali90 5 лет назад

    youre amazing

  • @arshamghafarizadeh7099
    @arshamghafarizadeh7099 2 года назад

    You are just subscirbed!!!!!

  • @jiwankumar213
    @jiwankumar213 3 года назад

    Op

  • @tsa_jim_ha_kho
    @tsa_jim_ha_kho 4 года назад

    Hey i'am from indonesia , can i follow u in instagram?

  • @fuiehfjfcnsl
    @fuiehfjfcnsl Год назад

    Ein Kommentar

  • @mohamedazizbennour3076
    @mohamedazizbennour3076 3 года назад

    we get the point u have a mac ,ok move on...

  • @masked00000
    @masked00000 4 года назад +2

    WORST for beginner

    • @EnderPrinceLive
      @EnderPrinceLive 4 года назад +5

      Stop being toxic, and dont start with something this hard, if you cant figure it out how is that the fricken creators fault, stop complaining.

  • @NTKM-om9vn
    @NTKM-om9vn 3 года назад

    How can I disable the auto adjust? Buttons and Labels are auto adjusting