javafx

How to get data in one Java FXML Controller from another FXML Controller (these controllers are not nested controllers)? [duplicate]

妖精的绣舞 提交于 2020-01-06 14:00:16
问题 This question already has an answer here : How can I use a variable from another Controller in JavaFX (1 answer) Closed 6 years ago . I have one button in one FXML and two text fields in another FXML. These two FXMLs are independent, I mean they are not nested. I want to print the text (which are in the two text fields) in the console/output whenever there is a click in the button. Below are the fxmls and their controllers: Button.fxml <AnchorPane id="AnchorPane" prefHeight="200.0" prefWidth=

How to get data in one Java FXML Controller from another FXML Controller (these controllers are not nested controllers)? [duplicate]

前提是你 提交于 2020-01-06 13:59:49
问题 This question already has an answer here : How can I use a variable from another Controller in JavaFX (1 answer) Closed 6 years ago . I have one button in one FXML and two text fields in another FXML. These two FXMLs are independent, I mean they are not nested. I want to print the text (which are in the two text fields) in the console/output whenever there is a click in the button. Below are the fxmls and their controllers: Button.fxml <AnchorPane id="AnchorPane" prefHeight="200.0" prefWidth=

How to get data in one Java FXML Controller from another FXML Controller (these controllers are not nested controllers)? [duplicate]

巧了我就是萌 提交于 2020-01-06 13:59:37
问题 This question already has an answer here : How can I use a variable from another Controller in JavaFX (1 answer) Closed 6 years ago . I have one button in one FXML and two text fields in another FXML. These two FXMLs are independent, I mean they are not nested. I want to print the text (which are in the two text fields) in the console/output whenever there is a click in the button. Below are the fxmls and their controllers: Button.fxml <AnchorPane id="AnchorPane" prefHeight="200.0" prefWidth=

The best way to get from user two dimensional array in javaFX

吃可爱长大的小学妹 提交于 2020-01-06 13:51:47
问题 I need to get matrix from user. Which of the JavaFX features is the most useful? Grid with (m*n) textFields or TableView? The thing is, it is hard to represent TableView with variable number of columns. 回答1: I'd use a TextArea public class Matrix extends Application { @Override public void start(Stage primaryStage) { TextArea txt = new TextArea(); GridPane grid = new GridPane(); grid.setGridLinesVisible(true); txt.setOnKeyReleased(t-> { int i = 0; String[] rows = txt.getText().split("\n");

Issues creating a javafx project

五迷三道 提交于 2020-01-06 08:42:07
问题 When ever i want to create a new javafx project in netbeans , when I get to the stage of naming my project, I get this error message: "Failed to automatically set-up a JavaFX Platform.Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime. Note: JavaFX SDK can be downloaded from JavaFX website" How can I solve this issue? 回答1: Just use NetBeans 8 (which has got rid of the

How to list dates from database onto JFXtras Agenda as Appointments: Google Calender style event listing

浪尽此生 提交于 2020-01-06 08:33:26
问题 I have event dates, titles, venues, attendees, start & end times, location and other metadata collected from users via forms then stored in a mysql database table. I would like to retrieve the events from the database and list them in Google Calender style . So far I only know of JFXtras Agenda having this kind of implementation. I've been trying for a long time now to work with JFXtras Agenda but I'm stuck at retrieving the events from the database and listing them on the Agenda as

“Exception in Application start method” when trying to launch GUI using FXML

喜你入骨 提交于 2020-01-06 08:08:40
问题 I'm working on a college project and I have to create a GUI. I'm trying to learn FXML but when trying to launch the GUI I get the following error: Exception in Application start method java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke

“Exception in Application start method” when trying to launch GUI using FXML

雨燕双飞 提交于 2020-01-06 08:08:02
问题 I'm working on a college project and I have to create a GUI. I'm trying to learn FXML but when trying to launch the GUI I get the following error: Exception in Application start method java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke

Java Vlcj - How to change media in EmbbededMediaPlayerComponent

橙三吉。 提交于 2020-01-06 07:12:06
问题 So I have a EmbbededMediaPlayerComponent and Javafx list full of urls which can be played in EmbbededMediaPlayerComponent. The one on which you click is then supposed to be played in EmbbededMediaPlayerComponent. The first url you choose works just fine and is displayed in the player. The thing is, after I choose another url I want the first one to be replaced with the second one. What is the correct way to dispose the first media and then play the second one? 回答1: I'm not sure if it's the

Java Vlcj - How to change media in EmbbededMediaPlayerComponent

混江龙づ霸主 提交于 2020-01-06 07:11:26
问题 So I have a EmbbededMediaPlayerComponent and Javafx list full of urls which can be played in EmbbededMediaPlayerComponent. The one on which you click is then supposed to be played in EmbbededMediaPlayerComponent. The first url you choose works just fine and is displayed in the player. The thing is, after I choose another url I want the first one to be replaced with the second one. What is the correct way to dispose the first media and then play the second one? 回答1: I'm not sure if it's the