Skip to content

Instantly share code, notes, and snippets.

@darmbrust
darmbrust / JavaFX Tooltip Configuration
Last active March 26, 2018 17:36
A utility method to allow setting the global timing parameters on tooltips in JavaFX (Java 8)
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import javafx.scene.control.Tooltip;
import javafx.util.Duration;
import org.slf4j.LoggerFactory;
/**
* {@link ToolTipDefaultsFixer}
*
* @author <a href="mailto:daniel.armbrust.list@gmail.com">Dan Armbrust</a>
@darmbrust
darmbrust / JSch logging
Created November 6, 2014 22:59
A bit of example code that routes logging from Jsch to SLF4j (using Java 8)
import java.util.HashMap;
import java.util.function.BooleanSupplier;
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jcraft.jsch.JSch;
/**
* Demonstrates enabling and routing JSch (http://www.jcraft.com/jsch/) logging
* into SLF4J (http://www.slf4j.org/) logging using Java 8