Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ComboBox<Person> aComboBox;
- aComboBox.getItems().addAll(People.getPeople());
- aComboBox.getItems().add(new Person("Add New...", ""))
- public void aComboBox() throws IOException {
- if (aComboBox.getValue().getFirstname() == "Add New...") {
- Parent AnotherView= FXMLLoader.load(getClass().getResource("AnotherView.fxml"));
- Stage Window = new Stage();
- Window.initModality(Modality.APPLICATION_MODAL);
- Window.setScene(new Scene(BillingView));
- Window.show();
- }
- }
- public void aComboBox() throws IOException {
- if (aComboBox.getValue().getFirstname() == "Add New...") {
- aComboBox.setValue(null);
- Parent AnotherView= FXMLLoader.load(getClass().getResource("AnotherView.fxml"));
- Stage Window = new Stage();
- Window.initModality(Modality.APPLICATION_MODAL);
- Window.setScene(new Scene(BillingView));
- Window.show();
- }
- }
Add Comment
Please, Sign In to add comment