Skip to content

Instantly share code, notes, and snippets.

@trashgod
trashgod / BubbleSortAnimation.java
Last active July 3, 2023 15:21
Bubble sort animated bar chart.
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
* @see https://stackoverflow.com/a/53579013/230513
*/
public class BubbleSortAnimation extends Application {
@trashgod
trashgod / VersionCheck.java
Last active April 18, 2023 22:35
Version check
import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
/**
* @see https://stackoverflow.com/q/11266997/230513
*/
@trashgod
trashgod / Image.png
Last active December 31, 2023 13:58
TableView summary
Image.png
@trashgod
trashgod / JDBCCategoryTest.java
Last active November 1, 2020 03:51
JDBCTest—JFreeChart examples using JDBCCategoryDataset, JDBCPieDataset and JDBCXYDataset
import java.awt.Dimension;
import java.awt.EventQueue;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Random;
@trashgod
trashgod / PriceVolumeChart.java
Last active March 14, 2022 17:49
PriceVolumeChart—JFreeChart combining XYBarRenderer and XYLineAndShapeRenderer
import java.awt.BasicStroke;
import static java.awt.BasicStroke.*;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Paint;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.time.Duration;
import java.time.LocalDate;
@trashgod
trashgod / Web.png
Last active April 15, 2024 21:47
WebViewPane—display a WebView that fills the enclosing pane.
Web.png