10
Hello, I imagine my doubt is simple but I haven’t found anything in the forums of life (probably because I don’t use the correct terms in the search).
I am creating a form for students in Javafx generating fxml files with Scene Builder, it is separated in two parts one general data and another for specific. In this case, one part for the student’s personal data to the other has data on the course of the same. Considering that there are five courses, the fields for each will be different.
I generated a fxml with the general information fields and left an empty pane to incorporate a fxml for one of the courses.
My goal is to offer a screen to the user with five buttons, one for each course, when he click on a the complete form is shown.
If anyone knows anything that can help me, please share. Thank you very much.
Adding information
I don’t have my computer so I’ll have to use another example, but the images below explain the situation better.
In this project the user can make a food complaint, animal or diverse, all of them share common information that can be observed in the top of the form the image below.
At the bottom, there is an empty Anchor pane that would like to load it with a specific form with the below. Stack Overflow didn’t allow me to insert more than two images.
Complaint control class code (general form):
public class QueixaController implements Initializable, IControlledScreen {
private ScreensController controller;
@FXML RadioButton choice;
@FXML DatePicker date;
@FXML ChoiceBox address;
@FXML TextArea descriptions;
@FXML TextArea observations;
@FXML AnchorPane pane;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
}
/**Método usado na transição de telas
@Override
public void setScreenParent(ScreensController controller) {
this.controller = controller;
}
}
Code for food complaint control class:
public class QueixaAlimentarController implements Initializable {
@FXML TextField commensal;
@FXML TextField sick;
@FXML TextField deads;
@FXML TextField inHoslpital;
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
}
My question is: is there any way to encode for the general data form to incorporate a specific data form avoiding creating a complete for each type of complaint, considering that I will have a screen for the user to choose what type of complaint to make?
Your question is cool, but it’s kind of hard to answer without you posting what you’ve already done or tried to do. You could post what you have already done, even to facilitate the process of writing a reply?
– Victor Stafusa
I updated the question, I imagine it’s clearer now but if you’re not, let me know that I try to tidy up. Thank you very much.
– Marcel
Your question now seems to be fine. I gave my vote to reopen.
– Victor Stafusa