Skip to content

Instantly share code, notes, and snippets.

@Da9el00
Da9el00 / Controller.java
Created June 3, 2021 17:50
JavaFX and Scene Builder - Writing text animation with threads
import com.jfoenix.controls.JFXButton;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.text.Text;
import java.net.URL;
import java.util.ResourceBundle;
@Da9el00
Da9el00 / Controller.java
Created June 5, 2021 15:25
Add and remove items from ListView - JavaFX
package sample;
import javafx.fxml.FXML;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent;
public class Controller {
@FXML
@Da9el00
Da9el00 / Controller.java
Created June 9, 2021 10:03
JavaFX Design - Modern Login Screen
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
import java.net.URL;
import java.util.ResourceBundle;
@Da9el00
Da9el00 / pom.xml
Created June 11, 2021 08:38
Java - Mapping objects to JSON
<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
@Da9el00
Da9el00 / Controller.java
Created June 16, 2021 13:11
JavaFX LineChar design
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.XYChart;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
@Da9el00
Da9el00 / Main.java
Created June 17, 2021 15:16
JavaFX 3D - Sphere
package sample;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.Scene;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
import javafx.scene.shape.Sphere;
import javafx.stage.Stage;
@Da9el00
Da9el00 / Main.java
Created June 18, 2021 21:11
JavaFX 3D - Change sphere color and adding lights
package sample;
import javafx.application.Application;
import javafx.scene.*;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
import javafx.scene.shape.Sphere;
import javafx.scene.transform.Translate;
import javafx.stage.Stage;
@Da9el00
Da9el00 / Controller.java
Created June 23, 2021 13:51
JavaFX and Scene Builder - Basic Java Search bar setup
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import java.net.URL;
import java.util.ArrayList;
@Da9el00
Da9el00 / Controller.java
Created June 25, 2021 09:33
JavaFX Number guessing game
package sample;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.TextField;
import javafx.scene.image.ImageView;
import javafx.scene.text.Text;
import java.net.URL;
@Da9el00
Da9el00 / Controller.java
Last active April 17, 2025 05:16
JavaFX - Move a square with multiple keyboard inputs
package sample;
import javafx.animation.AnimationTimer;
import javafx.beans.binding.BooleanBinding;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.input.KeyCode;