title: JavaFX - Creating a Responsive Layout
body: <p>I am creating a GUI application with the following layout:</p>
  <p>In a desktop size, I will have an HBox with an image next to some text. In a mobile view, the Image will be above (or below) the text.</p>
  <p>What is the best way to create a responsive design for this layout? I have found that switching the FXML during runtime causes a little lag while expanding and shrinking the window, but I want to keep as much of the layout in the FXML as possible just because it's a better design. Would it be best to load both the HBox and VBox FXML files and do a check on the size at runtime and depending on the size change the HBox to a VBox and add the contents programmatically?</p>
  <p><strong>Update</strong></p>
  <p>To be more specific, I was hoping for something responsive <em>and</em> clean. Here is a good example: <a href="https://www.youtube.com/watch?v=5T-h2czZ4_4" rel="nofollow noreferrer">https://www.youtube.com/watch?v=5T-h2czZ4_4</a></p>