Stack Exchange
Force a UI update
I have a piece of code designed to take a screenshot of a node in JavaFX:
public BufferedImage getSnapshot(final Node... hideNodes) {
    Window window = getScene().getWindow();
    Bounds b = localToScene(getBoundsInLocal());
    int x = (int) Math.round(window.getX() + getScene().getX() + b.getMinX());
    int y = (int) Math.round(window.getY() + getScene().getY() + b.getMinY());
    int w = (int) Math.round(b.getWidth());
    int h = (int) Math.round(b.getHeight());
    try {
        Robot robot = new Robot();
        for(Node node : hideNodes) {
            node.setOpacity(0);
            node.getParent().requestLayout();
        }
        BufferedImage image = robot.createScreenCapture(new java.awt.Rectangle(x, y, w, h));
        for(Node node : hideNodes) {
            node.setOpacity(1);
            node.getParent().requestLayout();
        }
        return image;
    }
    catch(AWTException ex) {
        return null;
    }
}

It has a twist, and that is it should hide the given nodes before taking the screenshot (in case they overlap with the node, which in some cases is definite.)
However, I'm stuck finding a way to force a redraw to include the opacity change before taking the screenshot - the only reference I found was to requestLayout(), but no joy there.
What method(s) should I call to force and wait for a redraw to complete?

I find your code quite strange:

Why use node.setOpacity(0) to make it invisible, rather than node.setVisible(false)?     
Why return an AWT BufferedImage rather than a JavaFX Image?    
Why use a robot to capture of the screen rather than taking a snapshot of the scene?    
Why mix Swing and JavaFX and end up having to worry about rendering order?

Perhaps there are reasons for these things which I don't understand, but I'd just do it this way:
public Image takeSnapshot(Scene scene, final Node... hideNodes) {
  for (Node node: hideNodes) node.setVisible(false);
  Image image = scene.snapshot(null);
  for (Node node: hideNodes) node.setVisible(true);

  return image;
}  

I created a small sample app which uses the above routine.
The primary window includes a group with a circle and a rectangle.  When a snapshot command is issued, the rectangle is hidden in the primary, a snapshot of the primary is taken, then the rectangle is made visible in the primary again.
 

To answer your question's title about forcing a UI update - you can't really.  The JavaFX application thread and JavaFX rendering thread are to be treated as two separate things.  What you need to do is run your processing on the JavaFX application thread, seed control back to the JavaFX system, wait for it to do it's rendering, then examine the results.  The scene.snapshot method will take care of that synchronization for you so you don't need to worry about it.  
If, for whatever reason, scene.snapshot won't work for you and you wanted to maintain something similar to your original strategy, then what you would do is:

Issue some update commands (e.g. setting node opacity to 0) on the JavaFX application thread.
Issue a Platform.runLater call and take your robotic snapshot in the runLater body.
Once the snapshot has really been taken (notification in some awt callback), issue another Platform.runLater command to get back on the JavaFX application thread.
Back in the JavaFX application thread, issue some more update commands (e.g. setting node opacity back to 1).  

This should work as it will allow the JavaFX system to perform another pulse which performs a rendering layout of the screen with the opacity changes before your robot actually takes the snapshot.  An alternate mechanism is to use a JavaFX AnimationTimer which will provide you with a callback whenever a JavaFX pulse occurs.  Maintaining proper synchronization of all of this between the AWT and JavaFX threads, would be annoying.

Many thanks for the comprehensive answer - a lot of the oddities can be explained by the fact I was simply unaware of the snapshot method, and thought that using an old awt robot was the only option. I'll gladly use that approach and do away with it! The BufferedImage however is needed, as it feeds to a library method which takes a BufferedImage - but that's an easy enough conversion.

To convert your JavaFX Image to a BufferedImage, I advise using SwingFXUtils.fromFXImage
