eman 22 0 Junior Poster in Training

I want to insert an image from my hard disk into the application but unfourtantly my code
doesn't work and I can't determine what causes that the image disapear.

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;

/**
 * @author city
 */
def image = Image {
    url:"E://images//Msh"
   backgroundLoading: true
    
}
Stage {
    title: "Application title"
    scene: Scene {
        width:800
        height: 600
        content: [
            ImageView {
                 image: image
                 x: 10
                 y: 10


                 }
        ]
    }
}

the image not appear when I run the program although I saved it in >> E://images//Msh.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.