public void bringNodeToFront(final Node node) {
    final Graph2D g = (Graph2D) node.getGraph();
    final NodeRealizer r = g.getRealizer(node);

    if (r.isSelected()) {
      // This does not work properly! Why? NH
      for (final NodeCursor nc = g.selectedNodes(); nc.ok(); nc.next()) {
        m_nodesInDrawingOrder.remove(nc.node());
        m_nodesInDrawingOrder.add(nc.node());
      }
    } else {
      // This seems to work correctly.
      m_nodesInDrawingOrder.remove(node);
      m_nodesInDrawingOrder.add(node);
    }
  }
This set contains the nodes in drawing order. The nodes to be drawn first are in the set early.
The nodes drawn over the earlier nodes are in the set late.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/ZyGraphDefaultRenderer.java