基本上,我只想将图像插入网格窗格内的单元格中.
GridPane gridpane = new GridPane();
gridpane.add(new Image("File:image/myfile.jpg"));
getChildren().addAll(gridpane);
Run Code Online (Sandbox Code Playgroud)
总是告诉我"图像是抽象的,无法实例化".我用google搜索得非常模糊地发现我必须将它用作BufferedImage或其他东西?实际上并没有得到它.我在这做错了什么?