Java examples for JavaFX:Node
make JavaFX Node Scrollable
//package com.java2s; import javafx.scene.Node; import javafx.scene.control.ScrollPane; import javafx.scene.control.TableView; public class Main { public static Node makeScrollable(Node content) { ScrollPane scrollPane = new ScrollPane(); scrollPane.getStyleClass().addAll("noborder-scroll-pane", "texture-bg"); scrollPane.setFitToWidth(true);/*from w w w. ja v a2 s . c o m*/ scrollPane.setContent(content); return scrollPane; } public static Node makeScrollable(TableView<?> table) { ScrollPane scrollPane = new ScrollPane(); scrollPane.setPrefHeight(300); scrollPane.setContent(table); return scrollPane; } }