question: @ Override protected void _setBounds ( long nativeWindowPointer , int x , int y , boolean xSet , boolean ySet , int w , int h , int cw , int ch , float xGravity , float yGravity ) { int width ; int height ; if ( w > 0 ) { width = w ; } else if ( cw > 0 ) { width = cw ; } else { width = getWidth ( ) ; } if ( h > 0 ) { height = h ; } else if ( cw > 0 ) { height = ch ; } else { height = getHeight ( ) ; } if ( ! xSet ) { x = getX ( ) ; } if ( ! ySet ) { y = getY ( ) ; } if ( maxW >= 0 ) { width = Math . min ( width , maxW ) ; } if ( maxH >= 0 ) { height = Math . min ( height , maxH ) ; } width = Math . max ( width , minW ) ; height = Math . max ( height , minH ) ; notifyResizeAndMove ( x , y , width , height ) ; }
target:  w/h is the total window width/height including all its decorations (e.g. title bar). cw/ch is the "client", or interior width/height. Negative values for w/h/cw/ch are treated as "not set". For example: setBounds(x, y, xSet, ySet, 800, 600, -1, -1) will make the window 800x600 pixels. The client area available for drawing will be smaller, e.g. 792x580 - it depends on the window decorations on different platforms. setBounds(x, y, xSet, ySet, -1, -1, 800, 600) will make the window client size to be 800x600 pixels. The area for drawing (FX scene size) will be exactly 800x600, but the total window size including decorations will be slightly bigger. For undecorated windows w/h and cw/ch are obviously the same. As this is a void function the native code should trigger an event to notify the system on actual change