I have class A and B.
In Class A, there's a hyperlink abc ="Go to B"
When you click that hyperlink, class B should be launched.
I tried
abc.setOnAction(e->Application.launch(B.class));
But it doesnt work.
Need to code this hyperlink using only JavaFX
. No FXML
or any other types.
Asked
Active
Viewed 14 times
0
-
can you define "it doesn't work"? – WhatsThePoint May 01 '18 at 13:09
-
2Welcome to SO! This question is absolutely on topic, but too broad as it currently stands - I'm afraid we've no way of knowing what's wrong unless you post a [mcve]. – Michael Berry May 01 '18 at 13:12
-
Either [here](https://stackoverflow.com/questions/13556637/how-to-have-menus-website-style-navigation-links-in-java-desktop-application) or `primaryStage.setScene(new Scene(yourRootNode));` – SedJ601 May 01 '18 at 13:28