Skip to content
Snippets Groups Projects

4018 error view java fx

Merged Saad bin Abid requested to merge 4018_ErrorViewJavaFX into master
Files
14
@@ -26,6 +26,7 @@ import javafx.fxml.FXMLLoader;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Tooltip;
/**
* Utility methods for {@link Scene} graph.
@@ -197,4 +198,14 @@ public final class JavaFXUtils {
}
return null;
}
/**
* Creates a tooltip with the given text, yellow background and black font. The standard tooltip
* is white font on yellow background which is hardly readable.
*/
public static Tooltip createToolTip(String description) {
Tooltip value = new Tooltip(description);
value.setStyle("-fx-background-color: yellow; -fx-text-fill: black;");
return value;
}
}
Loading