java - Architecture of a multiple-windowed JavaFX 8 Application -


i'm building multi-window , multi-module simulation application, , use javafx gui.

from understood, make javafx project run, need run application.launch( myapplicationsubclass.class ) , use primary stage given in start(stage primarystage) method started. in start method , beyond happens in javafx thread.

my app multi-moduled application. today, main class bootstraps program , launches several modules (which distinct maven modules), including 1 in charge of gui. in beginning (when designed current architecture), planned create 1 window. so, once loaded, gui module make application.launch( myonlymainwindow.class ) call, , work fine.

today, i'd add console window, launched before module, , used "live-log" application (by redirecting system.out stream, between other things, textflow). architecture described, it's impossible, because if want ot keep application.launch() call in gui module, can't make in console window, not part of gui module. impossible add gui module manage set of window.

so can think of 2 , half ways solve this:

  • centralize, somehow, application.launch() call available every class need it. don't know how though.
  • change main class heritate javafx application class. wouldn't make me execute module instanciations javafx thread? guess bad way of doing things. or even, if decide create other threads module instanciation, threads have been created in javafx thread.
  • (use swing console window, though not solve problem viable way... if need create window in gui module?)

what viable way of creating , managing multiple window application javafx? how i, instance, centralize javafx application.launch() calls?

or, in other words

is practice decentralize javafx application implementation in module , launch module main() class, or better implement in main() class, if try make program modular?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -