Creating a Frame

Take a look at the following code snippet.

Frame {
  title: "Nodes (JavaFX demo)"
  content: Canvas {
    content: Nodes {}
  }
  visible: true
}

As you see from the code, JavaFX uses declarative syntax to specify GUI components so that the developer's code matches the actual layout of the GUI. You start building the GUI with a declaration of a Frame, then you set the frame's title, and add contents to the frame.

This code sample is from Using the Scene Graph to Present Visual Objects in JavaFX Script

Labels

howtoframe howtoframe Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact