ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
// *************** Controller.java ***************package application;import javafx.event.ActionEvent;import javafx.fxml.FXML;import javafx.scene.control.Button;import javafx.scene.control.CheckBox;import javafx.scene.control.Label;import javafx.scene.control.RadioButton;import javafx.scene.control.TextField;import javafx.scene.image.Image;import javafx.scene.image.ImageView;public class Controller { @FXML private Label myLabel; @FXML private RadioButton rButton1, rButton2, rButton3; public void getFood(ActionEvent event) { if(rButton1.isSelected()) { myLabel.setText(rButton1.getText()); } else if(rButton2.isSelected()) { myLabel.setText(rButton2.getText()); } else if(rButton3.isSelected()) { myLabel.setText(rButton3.getText()); } }}// *************** Scene.fxml ***************
Thank you for this. I was setting mine to change the scene based on which radio button was selected, instead I think I'll just change the label on a grindpain.
Thanks bro - needed this.
I COULDN'T COMMENT BRO, also watched the whole thing in 2x and skips bro! Thanks! Helped me out a lot, have a great day!
I can't even comment on all videos, keep going the same, Bro!
BUT I can ITs for legend
Thank you so much ❤️❤️❤️
Nice Tutorial!
thanks bro this really helped me
da best
should I learn JavaFX or Swing?
Amazing
Thank you!
Are this just JRadioButtons but you do them in a UI?
What about add listener for the group?
how to select multiple radiobutton
thanks
o
// *************** Controller.java ***************
package application;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class Controller {
@FXML
private Label myLabel;
@FXML
private RadioButton rButton1, rButton2, rButton3;
public void getFood(ActionEvent event) {
if(rButton1.isSelected()) {
myLabel.setText(rButton1.getText());
}
else if(rButton2.isSelected()) {
myLabel.setText(rButton2.getText());
}
else if(rButton3.isSelected()) {
myLabel.setText(rButton3.getText());
}
}
}
// *************** Scene.fxml ***************
Thank you for this. I was setting mine to change the scene based on which radio button was selected, instead I think I'll just change the label on a grindpain.
Thanks bro - needed this.
I COULDN'T COMMENT BRO, also watched the whole thing in 2x and skips bro! Thanks! Helped me out a lot, have a great day!
I can't even comment on all videos, keep going the same, Bro!
BUT I can
ITs for legend
Thank you so much ❤️❤️❤️
Nice Tutorial!
thanks bro this really helped me
da best
should I learn JavaFX or Swing?
Amazing
Thank you!
Are this just JRadioButtons but you do them in a UI?
What about add listener for the group?
how to select multiple radiobutton
thanks
o