package janelas;

import java.io.IOException;
import java.net.URL;

import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;

public class ControlePrincipal {

	public void acaoBotao() throws IOException{
		URL url = this.getClass().getResource("/janelas/SegundaJanela.fxml");
		Parent janela = (Parent) FXMLLoader.load(url);
		
		Scene cena = new Scene(janela, 600, 400);
		Stage stage = new Stage();
		stage.setTitle("Segunda Janela");
		stage.setScene(cena);
		stage.initModality(Modality.APPLICATION_MODAL);
		stage.show();
	}
}
