I cannot find an answer about this anywhere on the internet.
I have an application that has to have collapsable panels, so the TitledPane and Accordion set-up in Jav
In the present day at the end of 2018 nothing of these solutions works with JavaFX of JDK 1.8. So I've working on a simple solution. You can copy this method in and utility class:
public static boolean hideArrow(TitledPane pane) {
Node arrowButton = pane.lookup(".arrow-button");
if (arrowButton == null) {
return false;
}
// I don't know how with this the arrow space disappears...., but it does
arrowButton.setStyle("-fx-background-color: black;");
Parent titleRegion = arrowButton.getParent();
titleRegion.addEventFilter(MouseEvent.ANY, MouseEvent::consume);
titleRegion.setCursor(Cursor.DEFAULT);
((StackPane) titleRegion).getChildren().remove(arrowButton);
return true;
}