mercredi 11 janvier 2023

TextField get Text javaFx

Im trying to get the text from textfield but value from but cant get the value what will be the problem in it.

TextField field=new TextField(); ` public void onTextChange() {

    String text = field.getText();
    List<Character> charList=text.chars().mapToObj(e->(char)e).collect(Collectors.toList());
    for (Character character : charList) {
        originator.setWord(character);
        caretaker.addWord(originator.GetWordFromMomento());
    }
    System.out.println("String: "+text);
}`

Aucun commentaire:

Enregistrer un commentaire