Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package application;
  2.  
  3. import javafx.application.Application;
  4.  
  5. import javafx.stage.Stage;
  6. import javafx.scene.Scene;
  7. import javafx.scene.layout.BorderPane;
  8.  
  9.  
  10. public class Main extends Application {
  11. @Override
  12. public void start(Stage primaryStage) {
  13. try {
  14. BorderPane root = new BorderPane();
  15.  
  16. root.setLeft(new Button("left"));
  17.  
  18. Button xyz = new Button("Right");
  19.  
  20. Scene scene = new Scene(root,400,400);
  21. scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
  22. primaryStage.setScene(scene);
  23. primaryStage.show();
  24. } catch(Exception e) {
  25. e.printStackTrace();
  26. }
  27. }
  28.  
  29. public static void main(String[] args) {
  30. launch(args);
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement