I'm learning to move around in the JavaFX environment and I've already done all the
I need windows, but I still can not connect them to each other.
That is, for example, from the initial window VentanaMaestra.fxml
touch in the menu bar, touch Autos, and thus call the window AutosVentana.fxml
This is the VentanaMaestraController.java
package pantallas;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.application.Platform;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
/**
*
* @author leandrocotarelo
*/
public class VentanaMaestraController implements Initializable {
@FXML
private javafx.scene.control.MenuItem exit;
@FXML
private javafx.scene.control.MenuItem btn_Autos;
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
@FXML
public void cerrarApp(javafx.event.ActionEvent event) {
Platform.exit();
}
}
Este es el AutosVentanaController.java'package pantallas;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.fxml.Initializable;
/**
* FXML Controller class
*
* @author leandrocotarelo
*/
public class AutosVentanaController implements Initializable {
/**
* Initializes the controller class.
*/
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
}