Java Tutorial 39 (GUI) – Textfield (JTextField)

///Java Tutorial 39 (GUI) – Textfield (JTextField)

Java Tutorial 39 (GUI) – Textfield (JTextField)

FavoriteLoadingAdd to favorites

Java Tutorial 39
Source Code:

Java468x60

This Java tutorial will make you understand on how to use the text box for user inputs.

source

By |2019-08-21T22:00:23+00:00August 21st, 2019|Java Video Tutorials|31 Comments

31 Comments

  1. Niccster10 August 21, 2019 at 10:00 pm - Reply

    Very easy to understand!

  2. Hide On Baguette August 21, 2019 at 10:00 pm - Reply

    can u do a tutolial in chinese?

  3. Fupota August 21, 2019 at 10:00 pm - Reply

    Hey, a little hint: you can import: import javax.swing.*; then you dont have to import javax.swing.JTextField; , javax.swing.JButton; etc you only have to import javax.swing.*;

  4. Fustard ButtBurger August 21, 2019 at 10:00 pm - Reply

    Yet another youtube tutorial where the guy speak so slow i have to increase the speed of the video just so they don't sound like a down syndrome robot.

  5. KoWNeR August 21, 2019 at 10:00 pm - Reply

    thanks bro

  6. Steve DIAS August 21, 2019 at 10:00 pm - Reply

    muito bom entendi na hora

  7. Chaker Dorbane August 21, 2019 at 10:00 pm - Reply

    THANK YOU BROTHER !!!!!!!!!!!!!!!

  8. ishake belbel August 21, 2019 at 10:00 pm - Reply

    good

  9. faithless man August 21, 2019 at 10:00 pm - Reply

    extremely useful thank u

  10. Cheetah Tamer August 21, 2019 at 10:00 pm - Reply

    what is the difference between jtextfield and textfield?
    also is there a way to have both a canvas and a textfield?

  11. Keshav Varma August 21, 2019 at 10:00 pm - Reply

    my mail id is kbvarma333@gmail.com

  12. Keshav Varma August 21, 2019 at 10:00 pm - Reply

    hey bro give me ur mail id so i can ask u my doubts

  13. Álmos Phraner August 21, 2019 at 10:00 pm - Reply

    such lol style

  14. muhammed shamshad August 21, 2019 at 10:00 pm - Reply

    how to make readonly text field

  15. Neo Marxist August 21, 2019 at 10:00 pm - Reply

    Apparently I can't type in the text field…

  16. Farrukh Mehmood August 21, 2019 at 10:00 pm - Reply

    Cannot find symbol – class ActionListener

    Please help 🙁

  17. matochi506 August 21, 2019 at 10:00 pm - Reply

    I love you haha, seriously though, thank you so much for this. Finally got it to work!

  18. E-Ninja August 21, 2019 at 10:00 pm - Reply

    thanks for the video it is very good

  19. Всеволод Левитан August 21, 2019 at 10:00 pm - Reply

    How to change height?

  20. sandy intisel August 21, 2019 at 10:00 pm - Reply

    why output in other frame textfield.

    i mean input textfield output textfield.

    tutor please..

  21. Myst August 21, 2019 at 10:00 pm - Reply

    Thank you for the tutorial. It was very helpful. How could I move output text down?

  22. CHAFIK LOUNICI August 21, 2019 at 10:00 pm - Reply

    thank you John , great thank's Brother

  23. XxTreem Tv August 21, 2019 at 10:00 pm - Reply

    Gud Job bro! Thanx

  24. AzderielBane August 21, 2019 at 10:00 pm - Reply

    For anyone watching. Click video settings, speed, 1.25. You're welcome.

  25. Haider Ali August 21, 2019 at 10:00 pm - Reply

    thank sooosooo much ….. just a little cofusion due to which i could not work ..in text field due to you it resolve ….thanks

  26. Syed Fayzan August 21, 2019 at 10:00 pm - Reply

    I am doing the sane thing, but its not working. ? dont have a clue where the problem is
    – via YouPak(.com)

  27. Keith Scull August 21, 2019 at 10:00 pm - Reply

    BIG note to anyone here, I'm not sure why this program works the way it does when I don't see this in his code, but from my experience, you NEED to add the pack(); method WITHIN the actionperformed/listener method. Otherwise, it'll pack at initial startup, but whenever you add to the jlabel whatever you type into the JTEXT, you will have to adjust the window size to see it, but pack(); within the actionlistener methods will pack it as you go, every time you type into the JTextField. Note that you MUST type pack(); in both the actionlistener methods as well as wherever you're first executing the frame, (which is in this case, inside the Tutorial constructor which is executed thereafter via the main method) Basically, if you put pack(); in only the constructor in this case, it will pack at program runtime, but not when you type into the textfield and thus print that text into the jlabel, you will have to expand the box to see the jlabel.

    BUT, if you pack(); inside the actionlistener method and NOT the constructor where you're CALLING the frame, you will not have the frame packed properly at runtime, but the frame will pack when you type into the textfield. You need pack(); in both the execution of the frame as well as inside the actionlistener method.

  28. Shivangi Singh August 21, 2019 at 10:00 pm - Reply

    please can you explain getText and setText.
    and how to command it to be displayed on the screen

  29. Ryan Anthony August 21, 2019 at 10:00 pm - Reply

    You can also use lambda expressions when making ActionListeners.

  30. quenar August 21, 2019 at 10:00 pm - Reply

    Thank You 🙂

  31. Captain Dedpul August 21, 2019 at 10:00 pm - Reply

    Hi John, how do i make the text field appear on a specific location?.. lets say my frame size is 300X300, i want the textfield location on 20X30, how do i do that? Thanks in advance.

Leave A Comment

*