JavaFX Tutorial 11 - RadioButton, ToggleGroup

Поділитися
Вставка
  • Опубліковано 27 лис 2018
  • Radio Buttons enable the user to choose a single item from a group of choice.
    To group radio buttons, you need to create an object of ToggleGroup and set a radio button’s toggleGroup property to join the group as follows;
    ToggleGroup tgFruit = new ToggleGroup();
    rbApple.setToggleGroup(tgFruit);
    rbOrange.setToggleGroup(tgFruit);
    rbPear.setToggleGroup(tgFruit);
    In this way, only one radio button can be selected from the same button group for radio buttons.
    Using the Scene Builder, this is a quite simple procedure. In this tutorial, you set the Toggle Group property to “tgFruit” for all three radio buttons.
  • Наука та технологія

КОМЕНТАРІ • 9

  • @jlmaria
    @jlmaria 2 роки тому +1

    This is very helpful! Thanks!

  • @fanir2661
    @fanir2661 3 роки тому +1

    Very helpful thank you!!

  • @italotchaikowsky7661
    @italotchaikowsky7661 3 роки тому +1

    Thank you so much Bro!!!!!

  • @didarnepesov8064
    @didarnepesov8064 3 роки тому +1

    cool, helped a lot

  • @libanbande4640
    @libanbande4640 Рік тому

    Hi I was wondering if you could make a video tutorial on how to use skins in javafx and how to create them for applications.

  • @mariogarcia7600
    @mariogarcia7600 2 роки тому

    Hi Ken thank you for that explanation. Really good. What is that fxml editor that you use?

    • @Ken-oh5yh
      @Ken-oh5yh  2 роки тому

      It was JavaFX Scene Builder 2.0, you may download and use 8.5.0 for JDK 8. It is available from gluonhq.com/products/scene-builder/