javafx basics scene builder cs 2112 lab 9 javafx
play

JavaFX Basics Scene Builder CS 2112 Lab 9: JavaFX JavaFX Basics - PowerPoint PPT Presentation

JavaFX Basics Scene Builder CS 2112 Lab 9: JavaFX JavaFX Basics Scene Builder CS 2112 Lab 9: JavaFX October 29 / 31, 2018 CS 2112 Lab 9: JavaFX JavaFX Basics Scene Builder JavaFX JavaFX is a modern object-oriented graphics library that


  1. JavaFX Basics Scene Builder CS 2112 Lab 9: JavaFX

  2. JavaFX Basics Scene Builder CS 2112 Lab 9: JavaFX October 29 / 31, 2018 CS 2112 Lab 9: JavaFX

  3. JavaFX Basics Scene Builder JavaFX ◮ JavaFX is a modern object-oriented graphics library that provides the ability to create and manipulate cross-platform compatible graphical user interfaces ◮ Other Java GUI libraries include AWT (Abstract Window Toolkit) and Swing CS 2112 Lab 9: JavaFX

  4. JavaFX Basics Scene Builder Scene Graph JavaFX manages the user interface as a scene graph, which is actually a tree of nodes. At the root of the scene graph is some node; the node is registered with a Scene object that is in turn registered with a Stage, which corresponds to a top-level window in the application. CS 2112 Lab 9: JavaFX

  5. JavaFX Basics Scene Builder Adding Components Components can be created and added programatically. By modifying their properties through calling their appropriate methods, the entire GUI can be constructed through code. Parent p; 1 Node n; 2 p.getChildren (). add(n); 3 CS 2112 Lab 9: JavaFX

  6. JavaFX Basics Scene Builder Scene Builder Alternatively, Scene Builder provides a graphical interface for designing and constructing user interfaces. Scene Builder allows for components to be created, placed, and for many of their properties to be modified. CS 2112 Lab 9: JavaFX

  7. JavaFX Basics Scene Builder Download Scene Builder Scene Builder can be downloaded at the following link: https://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-info-2157684.html CS 2112 Lab 9: JavaFX

  8. JavaFX Basics Scene Builder FXML Scene Builder will save your layouts into an FXML file, which can be read in through Eclipse to create the GUI. final URL r = getClass (). getResource("main.fxml"); 1 final Parent node = FXMLLoader.load(r); 2 final Scene scene = new Scene(node ); 3 stage.setTitle("Lab 9 Demo"); 4 stage.setScene(scene ); 5 stage.sizeToScene (); 6 stage.show (); 7 CS 2112 Lab 9: JavaFX

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend