For some reason, I can't seem to get my image to show, though the button will show.
package sample;
/* Removed Package Import Statements*/
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
GridPane gridPane = new GridPane();
Image empty = new Image("File:empty.png");
ImageView view = new ImageView(empty);
Button button = new Button("Some Button");
GridPane.setRowIndex(button, 0);
GridPane.setColumnIndex(button, 1);
gridPane.setRowIndex(view, 0);
gridPane.setColumnIndex(view, 0);
gridPane.getChildren().addAll(view, button);
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(gridPane, 561, 400));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}