Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 1066 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FXML problems when open a new Stage Scene..!

#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]

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
Reply

#2
Thanks :smile:

About the problem, Are you sure the .fxml file is in the same package as your main controller?

Location is not set means that you have not provided a valid path to your .fxml file and remember file names are case sensitive too so check that just in case
Reply

#3
Try CLEAN AND BUILD on the project and then run it again, then report back
Reply

#4
I did it and the same result
Reply

#5
Yes it's brother i attach an image project
[Image: 552rg5.png]

From the SceneController I call FXMLIconFinder as you apreciate it's in the same packege I'm very ofuscated with this I cann't foward with my project.
Reply

#6
I see your .fxml file name is different than the one you put in your file "FXMLIcon_Finder.fxml" or did you changed it just now?
Reply

#7
i have question what is FXML ?
Expalin it to me pls!
And you use java yes? Wich IDE you use?
Reply

#8
This is definitely a problem with the path that you are providing, Also try this:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


@Mr.Kurd Check out my tutorial on JavaFX

[To see links please register here]

Reply

#9
thank buddy really thank.


thank buddy really thank i read it all with my matmatic. Hhhh
Reply

#10
Irrelevant to the topic but nice signature op.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through