Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

intellij java fx new window

btnOpenNewWindow.setOnAction(new EventHandler<ActionEvent>() {
    public void handle(ActionEvent event) {
        Parent root;
        try {
            root = FXMLLoader.load(getClass().getClassLoader().getResource("path/to/other/view.fxml"), resources);
            Stage stage = new Stage();
            stage.setTitle("My New Stage Title");
            stage.setScene(new Scene(root, 450, 450));
            stage.show();
            // Hide this current window (if this is what you want)
            ((Node)(event.getSource())).getScene().getWindow().hide();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: https://graph.instagram.com/14.0/10218560180051171 
Java :: JAVA Declaration Statements 
Java :: edit text on 2sec change andropid 
Java :: h2 database spring boot create table application.properties 
Java :: repeat a string in java 
Java :: set java time complexity 
Java :: first none duplicated char 
Java :: how to find poiwer in java 
Java :: how to create a sublist in java 
Java :: strictfp java example 
Java :: url to json 
Java :: how to open material navigation view on button click 
Java :: how to hide search from menu android studio from activity 
Java :: no main attribute in java android 
Java :: java deserialize json array 
Java :: grava 
Java :: print method in java 
Java :: Start Text from top left android 
Java :: java nom de la methode actuel 
Java :: Iterating & Adding to a Stack 
Java :: conexion a mysql java 
Java :: java program operations by classes and objects 
Java :: import classes from another project java 
Java :: setbackgroundcolor android 
Java :: how to come from 2nd fragment to first fragment android 
Java :: Get Max Value Element From List With Objects 
Java :: 2.5g ethernet linux problem 
Java :: antlr TestRig in java program 
Java :: default access modifier java 
Java :: jakarta allow cross origins 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =