JavaFX TextField 💬

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ธ.ค. 2024

ความคิดเห็น • 31

  • @BroCodez
    @BroCodez  3 ปีที่แล้ว +15

    //************************************************************************************
    // JavaFX TextField validate user input
    //************************************************************************************
    //************************************Scene.fxml***********************************


















    //*********************************Controller.java***********************************
    package application;
    import javafx.event.ActionEvent;
    import javafx.fxml.FXML;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.TextField;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    public class Controller {
    @FXML
    private Label myLabel;
    @FXML
    private TextField myTextField;
    @FXML
    private Button myButton;

    int age;

    public void submit(ActionEvent event) {

    try {
    age = Integer.parseInt(myTextField.getText());

    if(age >= 18) {
    myLabel.setText("You are now signed up!");
    }
    else {
    myLabel.setText("You must be 18+");
    }
    }
    catch (NumberFormatException e){
    myLabel.setText("enter only numbers plz");
    }
    catch (Exception e) {
    myLabel.setText("error");
    }
    }
    }
    //************************************************************************************

    • @trevorcolen3540
      @trevorcolen3540 2 ปีที่แล้ว

      Is there a github or anything like that? Im trying to fix my main but im not quite sure why it wont run. Thank you for all the content though!

    • @ciresfrancisco3572
      @ciresfrancisco3572 9 หลายเดือนก่อน

      hey mister bro i was wondering that javafx changed over the year cuz im getting a lot of errors even tho im following the tutorial

  • @jegor06
    @jegor06 3 ปีที่แล้ว +4

    Bro, I love the fact, that you're making badass content for your bros, thank you for that!

  • @vedantdeshmukh1549
    @vedantdeshmukh1549 3 ปีที่แล้ว +11

    Hey Bro!
    Ur Content is so awesome.
    You don't teach like a teacher, you teach as if a big bro is teaching to his younger sibling.
    Please bring more videos....people are waiting.

  • @rapbimsfrienda22
    @rapbimsfrienda22 2 ปีที่แล้ว +1

    The way you are teaching was superb and easy to understand the topics which are complicated

  • @prakharposwal9
    @prakharposwal9 3 ปีที่แล้ว +6

    you are making learning so easy thnx for that :)

  • @valencefootball9740
    @valencefootball9740 3 ปีที่แล้ว +2

    Underrated afffffffffffffffffff

  • @arijitmohapatra8737
    @arijitmohapatra8737 3 ปีที่แล้ว +1

    Keep going bro😍

  • @mohmedishak8853
    @mohmedishak8853 3 ปีที่แล้ว +1

    I'm officially a fellow bro now!

  • @AbdoulDataAnalyst
    @AbdoulDataAnalyst 2 ปีที่แล้ว

    Bro ! You teach very well! 👍

  • @namenachname4999
    @namenachname4999 3 ปีที่แล้ว +1

    Yo bro, can you make a long tutorial of fx like the java or java gui tutorial?

    • @BroCodez
      @BroCodez  3 ปีที่แล้ว +1

      I will be, I just need to complete a video for each topic first, and then combine them all together

  • @AdebayoAbiodun-p5s
    @AdebayoAbiodun-p5s ปีที่แล้ว

    Great tuts here

  • @trevorcolen3540
    @trevorcolen3540 2 ปีที่แล้ว +2

    Does anyone know if there is a github or anything availabe for these? Im trying to debug my main file but am having a bit of trouble.

  • @seereebee
    @seereebee 2 ปีที่แล้ว +1

    I have basically the same code that he has at 3:55 but I keep getting a null pointer exception error. Does anyone know what I could be doing wrong?

  • @sihleeundefined1208
    @sihleeundefined1208 3 ปีที่แล้ว +1

    Hey bro👍🏿 hope you well, I got a question on textfield, I tried creating a choicebox and textfield and validate both objects with an && if statement and struggle🤔

  • @visionvc3956
    @visionvc3956 3 ปีที่แล้ว +1

    I need to do this but instead of a int I need a string. How do I do that?

  • @gaberuszala2928
    @gaberuszala2928 ปีที่แล้ว

    Beautiful.

  • @amirtemur6872
    @amirtemur6872 3 ปีที่แล้ว

    please make python full course

  • @lucafera2302
    @lucafera2302 2 ปีที่แล้ว +1

    OBRIGADOOO s2

  • @valencefootball9740
    @valencefootball9740 3 ปีที่แล้ว

    I pasted the code to blue j, but it's showing errors

  • @chemso_1
    @chemso_1 8 หลายเดือนก่อน

    da best

  • @nirusanhariharan8382
    @nirusanhariharan8382 2 ปีที่แล้ว

    Thanks bro

  • @Arxa93
    @Arxa93 2 ปีที่แล้ว

    Thx again

  • @samfischer1563
    @samfischer1563 3 ปีที่แล้ว

    Hello bro.please how To import "javafx.event.action.event" in my eclypse.???

  • @superTramp572
    @superTramp572 ปีที่แล้ว

    Hey Bro, can you please please please make a video of autocomplete textfield in javafx which is actualy up to date? Please? I've been searching and swearing for hours now but nothing seem to work.... I'd to pay you !

  • @ajisukma766
    @ajisukma766 3 ปีที่แล้ว

    please bro lenguage INDONESIA🇲🇨

  • @CHITUS
    @CHITUS 2 ปีที่แล้ว +1

    Bro, I love the fact, that you're making badass content for your bros, thank you for that!