title: JavaFX Menu Flow
body: <p>I have an application with two menu bars (application menus and administration menus) on the top row and a search box in between them.  The first menu bar is left justified with the search box immediately following while the second menu is right justified.  This leaves room for additional application menus without moving the administration menus.</p>
  
  <p>I tried an HBox, but can't get the second menu right justfied.</p>
  
  <p>I tried using an AnchorPane and anchoring the application menu to the left and the admin menu to the right.  This works fine until you resize it.  When the display gets too small to show both menus it starts truncating letters.  I want it to wrap the second menu to the next line.</p>
  
  <p>I tried using a FlowPane which works great for getting one to flow under the other when resized, but I can't get the second menu reliable right justified.  I tried a trick of putting a listener on the parent width and calculating the hgap to use, but the first time this gets called, the menu bars have a size of 0 and so the hgap is too big for the actual menus.  After I resize it once, that trick works beautifully.</p>
  
  <p>Even better would be a menuBar that could flow automatically so that I didn't have to break it up to allow it to wrap around.  But if that capability exists, I've been unable to find it.</p>