14. User Interface Basics

As you saw in Chapter 4, “A Simple JavaFX Application,” the starting point for building user interfaces in JavaFX is the javafx.stage.Stage class, which acts as a link between your application and the component that is used as the top-level container of the application when it is executed. The nature of the top-level container depends on the environment in which the application is running: On the desktop, it is a frame; in a browser, it is an applet; on a cell phone, it is a MIDlet; and on a TV device, it is an Xlet. These four containers have different application programming interfaces (APIs), so if you were writing a graphical user interface (GUI) application in Java, your code would be at least partly dependent ...

Get JavaFX™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.