Class FxApplication

  • All Implemented Interfaces:
    UiApplication

    public abstract class FxApplication
    extends javafx.application.Application
    implements UiApplication
    Base class for you main application to build your client with JavaFx.
    Example:
     public class MyFxApp extends FxApplication {
    
       public void start() {
         MyApp myApp = new MyApp();
         myApp.run();
       }
    
       public static void main(String[] args) {
         Application.launch(MyFxApp.class, args);
       }
     }
     
    Since:
    1.0.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javafx.application.Application

        javafx.application.Application.Parameters
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CSS_LOCATION
      Location of the stylesheet (CSS file) to style all JavaFx stages.
      • Fields inherited from class javafx.application.Application

        STYLESHEET_CASPIAN, STYLESHEET_MODENA
    • Constructor Summary

      Constructors 
      Constructor Description
      FxApplication()
      The constructor.
    • Field Detail

      • CSS_LOCATION

        public static final String CSS_LOCATION
        Location of the stylesheet (CSS file) to style all JavaFx stages. Add this to you app and declare it as open module so it can be properly loaded and resolved.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FxApplication

        public FxApplication()
        The constructor.
    • Method Detail

      • start

        public final void start​(javafx.stage.Stage fxPrimaryStage)
                         throws Exception
        Specified by:
        start in class javafx.application.Application
        Throws:
        Exception
      • getPrimaryStage

        public javafx.stage.Stage getPrimaryStage()
        Returns:
        the primary Stage.