/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package bug; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.stage.Stage; /** * * @author andrew */ public class Bug extends Application { private static final String path = "src/bug/8b_gs.png"; /** * @param args the command line arguments */ public static void main(String[] args) { launch(Bug.class, args); } @Override public void start(Stage stage) throws Exception { ImageView iv = new ImageView(new Image(new FileInputStream(path))); HBox root = new HBox(); root.getChildren().add(iv); Scene scene = new Scene(root, 300, 300); stage.setScene(scene); stage.show(); } }