Thanks for your input Chuck! I have been using JFPanel as the root for my TopComponents but that is somewhat problematic now that I'm trying to make the move from Java 8 to Java 11+. In Java 11 the FX parts vanishes when rearranging the TopComponents.
So, yesterday I took a pen and paper to start rethinking the UI/UX and it might not be that hard to make the move from NetBeans Window System to WorkbenchFX, and keeping all the other good parts from the NetBeans Platform. Some Window System features will be missed though. /Patrik Den sön 29 sep. 2019 kl 05:24 skrev Chuck Davis <[email protected]>: > Partick, > > I've been waiting for somebody more knowledgeable to speak up but here > goes. Based on previous conversations on this list and elsewhere, there is > not going to be a JFX based NB WindowManager anytime soon. Experiments > have been done but the effort is exhaustive. If you need JFX in a netbeans > platform application you have to do it in a Swing component and there are > instructions (tutorials) how to do that. I did a little bit of it in my > last application showing graphs of agricultural products. It worked quite > well. > > I decided to make a clean break and go 100% JFX (in which you can use > Swing) on the project I'm currently building. It's been superb. Pure JFX > does not need a window manager due the the rich palette of containers built > in. I'm sure there are smarter people with better ideas than me but here > is what I did that is working well for a very extensive, dynamically > constructed menu system built depending upon the user credentials. The > project is a fund accounting system for not-for-profit accounting needs. > > Start with a Scene consisting of a BorderPane. In the top, place another > BorderPane. In the top of the top add a MenuBar. In the center, a > ToolBar. In the bottom something to show text -- a label or text area for > short messages. In the main BorderPane place in the center a TabPane. In > the bottom I placed a TextArea to show application messages to the user > (using a ToggleButton to show and dismiss to save real estate). At log-on, > via a ToggleButton, I show a pane in the left side. Various panes (JFX > containers) can come and go in either the right or left sides of the main > BorderPane (i.e. the BorderPane combined with JFX containers is essentially > a JFX window manager). As mentioned, the incredible number of containers > in JFX makes anything possible. Furthermore, if the use case requires you > can show additional stages and dialogs (or Swing components). > > Borrowing the concept of a "TopWindow" from NB, any Tab added to the > TabPane has to implement the "TopWindow" interface and fetched from a > static method that will only return one instance. The menu item actions > add tabs to the TabPane. Tabs in the TabPane manage an HBox or AnchorPane > (from fxml) that then contain a VBox, another HBox or other containers, a > TableView or orther controls.....whatever the use case demands for input or > display All very dynamic. It's beautiful the way it works. I am very > happy with JavaFX. Be advised, however, you have to make some trade-offs. > Like, for instance, there is no TitledBorder as in Swing (which I miss). > > Furthermore, NB and JavaFX are only going to get better with changes coming > very soon from PRs already in the pipeline. > > So, in summary, if you're building a Platform application let the Platform > manage your JFX components in the Swing component designed for that > purpose. But I can quite guarantee there will not be a JFX WindowManager > coming your way anytime soon -- it's simply not needed. > > > > On Fri, Sep 27, 2019 at 10:48 PM Patrik Karlström <[email protected]> > wrote: > > > I would like to have a JavaFx WindowManager available for platform > > applications. > > > > >
