Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Controllers;
- import java.net.URL;
- import java.util.ResourceBundle;
- /*Trabalho de programação
- Alunos: Jair Junior e Rafael Almeida*/
- import principal.Telamatrizes;
- import principal.Telaprincipal;
- import principal.Telavetores;
- import principal.Telavetoresematrizes;
- import javafx.event.ActionEvent;
- import javafx.event.EventHandler;
- import javafx.fxml.FXML;
- import javafx.fxml.Initializable;
- import javafx.scene.control.Button;
- import javafx.stage.Stage;
- public class TelaprincipalController implements Initializable{
- @FXML
- private ResourceBundle resources;
- @FXML
- private URL location;
- @FXML
- private Button btn_vetor, btn_matriz, btn_vetoresematrizes;
- @Override
- public void initialize(URL url, ResourceBundle bundle)
- {
- //Evento de clique no botão vetor
- btn_vetor.setOnAction(new EventHandler<ActionEvent>()
- {
- @Override
- public void handle(ActionEvent event)
- {
- try {
- new Telavetores().start(new Stage());
- Telaprincipal.getStage().close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- //Evento de clique no botão matriz
- btn_matriz.setOnAction(new EventHandler<ActionEvent>()
- {
- @Override
- public void handle(ActionEvent event)
- {
- try {
- new Telamatrizes().start(new Stage());
- Telaprincipal.getStage().close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- //Chama a tela de vetores e matriz
- btn_vetoresematrizes.setOnAction(new EventHandler<ActionEvent>()
- {
- @Override
- public void handle(ActionEvent event)
- {
- try {
- new Telavetoresematrizes().start(new Stage());
- Telaprincipal.getStage().close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement