I am new to javafx. Recently i try to do a program which can change an image in imageview by click a button to switch. Errors occur
@FXML
private ImageView imgView;
@FXML
private Button btnChange;
@FXML
void changeImage (ActionEvent event) throws IOException
{
Image image = new Image(getClass().getResource("Yuumi.jpg").toString());
imgView.setImage(image);
}
This is my project and the FXML code
This is my FXML.fxml code https://drive.google.com/open?id=1vQiMXxrRWd84YWcqmQO3xQx0Q1DdIBYt
The errors https://drive.google.com/open?id=1UwVzeEAp1YlhwP0xHZfxnioxEk2BAoC4
My FXML controller https://drive.google.com/file/d/1-7bAKoLhbLcC5bR4_boCG_O57sXPZpX_/view