It seems that putting the webview in a pane and using these lines of code is the problem
webview2.PrefWidth=Pane2.width-25
webview2.PrefHeight=Pane2.height-25
They are returning the width and height of Pane2 as 0 (zero) therefore the webview is being resized to -25 x -25 so you cant see it.
(prefWidth and prefHeight also return 0)
I had to explicitly set the pane width and height when I added it to the rootpane (f1.rootpane.addnode(p1,0,0,600,600) before the webview was visible.