To reproduce run following code
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.TitledPane;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class ButtonTest extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
HBox list = new HBox(10);
ScrollBar but=new ScrollBar();
but.setStyle("-fx-border-color:red;-fx-border-radius:10;");
but.setFocusTraversable(false);
list.getChildren().addAll(but);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(200);
stage.setHeight(200);
Scene scene = new Scene(getContent(),400,400);
stage.setScene(scene);
stage.show();
}
}
import javafx.application.Application;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.TitledPane;
import javafx.scene.control.ToggleButton;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
public class ButtonTest extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
HBox list = new HBox(10);
ScrollBar but=new ScrollBar();
but.setStyle("-fx-border-color:red;-fx-border-radius:10;");
but.setFocusTraversable(false);
list.getChildren().addAll(but);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
stage.setWidth(200);
stage.setHeight(200);
Scene scene = new Scene(getContent(),400,400);
stage.setScene(scene);
stage.show();
}
}