0

i am c# developer. Now i am learning Java and Javafx. My first question is;

1- I have 2 different form. first Form has one Textfield and one button, second form has to one textfield and button. I want to change first forms textfield from second forms

SecondForm textfielt.text ---send----> first Form textfield (i want to send second textfields text to first textfield)

Usually people want to reach second form Controls but i want opposite.

for c# i was using Delegates and Event for that. For Java what should i learn. I will be thankfull if someone can answer my question.

2- Can we say Javafx is future for UI dizayn or should i learn Swing to?

  • Part 2 of your question is off-topic (see also this question: https://stackoverflow.com/questions/7358775/java-gui-frameworks-what-to-choose-swing-swt-awt-swingx-jgoodies-javafx) As for part 1: [Pass the `text` property to the second form](https://stackoverflow.com/questions/14187963/passing-parameters-javafx-fxml) or if you want some kind of dialog you could use `Stage.showAndWait` and retrieve the data after it returns. You could of course also use some property stored somewhere else and use binding/a listener... – fabian Feb 24 '18 at 23:07
  • Maybe see https://stackoverflow.com/questions/26653562/how-to-access-parent-member-controller-from-child-controller – James_D Feb 24 '18 at 23:08
  • Or https://stackoverflow.com/questions/34118025/javafx-pass-values-from-child-to-parent – James_D Feb 24 '18 at 23:18

0 Answers0