layout bugs fixed (window in sample 2 did not resize correctly due to borderpane)