Skip to content

Instantly share code, notes, and snippets.

@Da9el00
Da9el00 / Controller.java
Created August 12, 2021 08:55
JavaFX and Scene Builder - Dodge the red rectangles!
package sample;
import javafx.animation.*;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.AnchorPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.util.Duration;
@Da9el00
Da9el00 / Controller.java
Created August 13, 2021 12:11
JavaFX with Scne Builder - Bouncing Ball
package sample;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Bounds;
@Da9el00
Da9el00 / Controller.java
Created August 15, 2021 13:45
JavaFX and Scene Builder - Make Components Draggable
package sample;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.AnchorPane;
import javafx.scene.shape.Rectangle;
import java.net.URL;
import java.util.ResourceBundle;
public class Controller implements Initializable {
package sample;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Bounds;
@Da9el00
Da9el00 / Controller.java
Created August 20, 2021 15:05
JavaFX and Scene Builder - Brick Breaker Game part 2
package sample;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Bounds;
@Da9el00
Da9el00 / Controller.java
Created August 24, 2021 10:10
JavaFX and Scene Builder - Tic-Tac-toe Game
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.text.Text;
import java.net.URL;
import java.util.ArrayList;
@Da9el00
Da9el00 / Controller.java
Created August 26, 2021 16:36
JavaFX and Scene Builder - Calculator
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
public class Controller {
@FXML
@Da9el00
Da9el00 / Controller.java
Last active May 7, 2022 04:22
JavaFX and Scene Builder - Hangman tutorial - Controller
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.text.Text;
import java.net.URL;
@Da9el00
Da9el00 / Controller.java
Created September 3, 2021 07:44
JavaFX and Scene Builder - Adding and Deleting TableView Rows
package sample;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
@Da9el00
Da9el00 / Controller.java
Created September 8, 2021 09:32
JavaFX and Scene Builder - Drawing Power and Exponential Function
package sample;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.RadioButton;
import javafx.scene.control.Slider;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Circle;