12. JavaFX¶
JavaFX is a library for creating and delivering applications with graphical user interfaces (GUIs) in Java. In this chapter, we will use JavaFX 17 along with Java 17. The API documentation for the many packages included with JavaFX can be found on the official API documentation website here. You can use the search feature on the API website to find a particular class or use the CSCI 1302 JavaFX Bookmarks page for direct links to commonly used classes.
Important
Prerequisite Information
This chapter assumes that the reader has a knowledge of basic Unix commands and experience working with a command-line text editor (e.g. emacs, vi, etc.).
To get the most out of this chapter, you should follow along and take notes.
Course-Specific Learning Outcomes
LO2.e: (Partial) Utilize existing generic methods, interfaces, and classes in a software solution.
LO7.a: (Partial) Design and implement a graphical user interface in a software project.
Chapter Contents
- 12.1. Getting Started
- 12.2. Compiling JavaFX Applications
- 12.3. High-Level Walkthrough
- 12.4. Mid-Level Walkthrough
- 12.5. Events and Event Handlers
- 12.6. JavaFX 17 Bookmarks and Notes
- 12.6.1. Packages of Interest
- 12.6.2. RE: App Class
- 12.6.3. RE: Scene Graph
- 12.6.4. RE: Layout Panes
- 12.6.5. RE: Controls
- 12.6.6. RE: Event Handling
- 12.6.7. RE: Menus
- 12.6.8. RE: Images
- 12.6.9. RE: Styling and CSS
- 12.6.10. Including a CSS file
- 12.6.11. RE: Timelines
- 12.6.12. Brief Timeline Explanation
- 12.6.13. Timeline Example