FXML problems when open a new Stage Scene..! 08-11-2016, 06:12 PM
#1
Hello brothers first of all I apreciated the post from @Ex094 he open my eyes to create amazing gui's with FX Scene Builder.
Now I 'm codding a program for Web Masters and I'got a problem when I open a new Stage.
I've got three fxml one for the main , the second fxml has two label (with imageviews) , the thirds fxml only has and Webview
For the label I had create onmouseClicked method it looks like this
@FXML
private void openIconFinder(MouseEvent event) throws IOException {
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("FXMLIcon_Finder.fxml"));
Parent root1 = (Parent) fxmlLoader.load();
Stage stage = new Stage();
stage.setScene(new Scene(root1));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
okey, as you can see as I want is open a new Stage including in its the Scene created in my "FXMLIcon_Finder.fxml". but
for some reasons i cann't understand why doesn't works for me
![[Image: 241se2x.png]](http://i65.tinypic.com/241se2x.png)
In my Webview java controler class the code is :
public class FXMLWebViewController implements Initializable {
@FXML
private WebView webview;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
webview.getEngine().load("https://www.google.com");
}
Thanks for read me and for your time
Now I 'm codding a program for Web Masters and I'got a problem when I open a new Stage.
I've got three fxml one for the main , the second fxml has two label (with imageviews) , the thirds fxml only has and Webview
For the label I had create onmouseClicked method it looks like this
@FXML
private void openIconFinder(MouseEvent event) throws IOException {
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("FXMLIcon_Finder.fxml"));
Parent root1 = (Parent) fxmlLoader.load();
Stage stage = new Stage();
stage.setScene(new Scene(root1));
stage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
okey, as you can see as I want is open a new Stage including in its the Scene created in my "FXMLIcon_Finder.fxml". but
for some reasons i cann't understand why doesn't works for me
![[Image: 241se2x.png]](http://i65.tinypic.com/241se2x.png)
In my Webview java controler class the code is :
public class FXMLWebViewController implements Initializable {
@FXML
private WebView webview;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
webview.getEngine().load("https://www.google.com");
}
Thanks for read me and for your time

![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)



![[Image: 552rg5.png]](http://i67.tinypic.com/552rg5.png)










![[Image: p_237m2jx1.png]](http://c.top4top.net/p_237m2jx1.png)
![[Image: f3zfa.png]](http://i66.tinypic.com/f3zfa.png)
![[Image: vfh3ma.png]](http://i64.tinypic.com/vfh3ma.png)