Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

JavaFX Event Handling using Scene Builder 🎪

105.1K views on YouTube

JavaFX Handling Events using Scene Builder tutorial example explained

#JavaFX #Event #Handling

package application;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.shape.Circle;

public class Controller {

@FXML
private Circle myCircle;
private double x;
private double y;

public void up(ActionEvent e) {
//System.out.println(“UP”);
myCircle.setCenterY(y-=10);
}
public void down(ActionEvent e) {
//System.out.println(“DOWN”);
myCircle.setCenterY(y+=10);
}
public void left(ActionEvent e) {
//System.out.println(“LEFT”);
myCircle.setCenterX(x-=10);
}
public void right(ActionEvent e) {
//System.out.println(“RIGHT”);
myCircle.setCenterX(x+=10);
}

}
Bro Code merch store 👟 :
===========================================================
https://teespring.com/stores/bro-code-5
===========================================================

music credits 🎼 :
===========================================================
Up In My Jam (All Of A Sudden) by – Kubbi https://soundcloud.com/kubbi
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Free Download / Stream: http://bit.ly/2JnDfCE
Music promoted by Audio Library https://youtu.be/tDexBj46oNI
===========================================================