Create SplitPane in JavaFX
________________________________________________
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class JavaFXSplitPane extends Application {
@Override
public void start(Stage stage) {
SplitPane sPane = new SplitPane();
VBox lBox = new VBox(new Label("Left Pane"));
VBox mBox = new VBox(new Label("Middle Pane"));
VBox rBox = new VBox(new Label("Right Pane"));
sPane.getItems().addAll(lBox, mBox, rBox);
Scene scene = new Scene(sPane, 250, 250);
stage.setTitle("JavaFX SplitPane");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
_____________________________________________
Dark Hers
YouTube
https://instagram.com/darkhers
https://www.facebook.com/darkhers
TikTok
https://www.tiktok.com/@darkhers
https://www.pinterest.co.uk/darkhers
Comments
Post a Comment