The JavaFX API enables developers to create UIs that work seamlessly across different devices. The common profile of the JavaFX API includes classes that function on both the desktop and mobile devices. However, you can use additional classes and packages from the desktop profile to take advantage of specific functionality that can enhance desktop applications. The JavaFX SDK contains the variants of the JavaFX Mobile Emulator available on Windows: a mobile phone, a touch phone, and a QWERTY phone simulations. Use the emulator to see how your applications will look on mobile devices. Refer to the SDK Readme file (<SDK-install-directory>/README.html) for more information on the mobile emulator. Common Profile
Apply controls that reside in the Figure 1: User Interface Components
UI components are used in the examples from the following lessons: Applying Data Binding to UI Objects and Laying Out GUI Elements. Prefabricated graphical charts is yet another beneficial functionality of the JavaFX SDK available in the ![]() Figure 2: Area Chart
![]() Figure 3: Bar Chart
![]() Figure 4: Bubble Chart
![]() Figure 5: Line Chart
![]() Figure 6: Pie Chart
![]() Figure 7: Scatter Chart
You can find the source code of these applications in the corresponding files: The following window is displayed when you run the application code provided in the ![]() Figure 8: Color Patterns
Color schemes are employed in the following lessons: Presenting UI Objects in a Graphical Scene, Creating Graphical Objects, Applying Data Binding to UI Objects, Laying Out GUI Elements, Creating Animated Objects, and Bringing Interactivity to GUI Elements. This screen capture shows basic geometric primitives and shapes you can create using the ![]() Figure 9: Basic shapes
Find the complete code of this application in the This application illustrates the basic fill methods available in the ![]() Figure 10: Basic filling methods
Find the complete code of this application in the When constructing geometric figures you can use different methods to join and end subpaths. The following screen capture shows the basic caps and joins available in the ![]() Figure 11: Line Cap and Join Styles
Find the complete code of this application in the The following window is displayed when you run the application code provided in the ![]() Figure 12: Text samples
Using text components is discussed in the following lessons: Presenting UI Objects in a Graphical Scene and Laying Out GUI Elements. The following screen capture demonstrates the basic transformations that can be performed for the graphics, images, or text in JavaFX applications. ![]() Figure 13: Transformations
Find the complete code of this example in the The following screen capture shows methods of laying out UI elements using the ![]() Figure 14: Horizontal Layout
![]() Figure 15: Vertical Layout
Find the complete code of these examples in the Desktop Profile
The following window is displayed when you run the compiled code in the ![]() Figure 16: Visual effects
Visual effects are employed in the demos of the following lessons: Creating Graphical Objects, Creating Animated Objects, and Bringing Interactivity to GUI Elements. The following example introduces different views of the cursor you can apply to any UI element in JavaFX. Compile and run the source code in the ![]() Figure 17: Cursor Styles
Find more information about how to apply the specific cursor style to a graphical object in Bringing Interactivity to GUI Elements. Conclusion
This lesson briefly introduced the basic GUI features available through the JavaFX SDK API. Refer to the API documentation for more details about the packages and classes used in the examples. Proceed with the next lessons of the tutorial to explore the JavaFX SDK capabilities in depth.
|
Tutorial Contents | |||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||