When running the code below I can't seem to move the dividers at all. I've tried without the HBox also.
Any help would be appreciated. I looked at the list of bugs and didn't seem to find a bug matching.
import java.util.List;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class OrganizingUIWithSplitViews extends Application {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(OrganizingUIWithSplitViews.class, args);
}
@Override
public void start(Stage primaryStage) {
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.WHITE);
SplitPane splitPane = new SplitPane();
splitPane.setPrefSize(400, 400);
List<Node> items = splitPane.getItems();
items.add(new Button("Left"));
items.add(new Button("Center"));
items.add(new Button("Right"));
HBox hbox = new HBox();
hbox.getChildren().add(splitPane);
root.getChildren().add(hbox);
primaryStage.setScene(scene);
primaryStage.setVisible(true);
}
}
Any help would be appreciated. I looked at the list of bugs and didn't seem to find a bug matching.
import java.util.List;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class OrganizingUIWithSplitViews extends Application {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Application.launch(OrganizingUIWithSplitViews.class, args);
}
@Override
public void start(Stage primaryStage) {
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.WHITE);
SplitPane splitPane = new SplitPane();
splitPane.setPrefSize(400, 400);
List<Node> items = splitPane.getItems();
items.add(new Button("Left"));
items.add(new Button("Center"));
items.add(new Button("Right"));
HBox hbox = new HBox();
hbox.getChildren().add(splitPane);
root.getChildren().add(hbox);
primaryStage.setScene(scene);
primaryStage.setVisible(true);
}
}