public static NGNode getBaseNode(Node n) {
   Scene.impl_setAllowPGAccess(true);
   // Eeek, this is gross! I have to use reflection to invoke this
   // method so that bounds are updated...
   try {
     java.lang.reflect.Method method = Node.class.getDeclaredMethod("updateBounds");
     method.setAccessible(true);
     method.invoke(n);
   } catch (Exception e) {
     throw new RuntimeException("Failed to update bounds", e);
   }
   n.impl_updatePeer();
   NGNode bn = n.impl_getPeer();
   Scene.impl_setAllowPGAccess(false);
   return bn;
 }