I have followed the FX 2 tutorial in order to add a .png image to a button, but I didn't succeed.
The pointer.png is in package icons: in controller class I have try this
@Override
public void initialize(URL url, ResourceBundle rb) {
Image pointer = new Image(getClass().getResourceAsStream("C:\\Users\\utente\\Desktop\\Java\\NewProjectX\\src\\icons\\Pointer.png"));
togglebuttonPointer.setGraphic(new ImageView(pointer));
but it doesn't work.
Any help really appreciated.