1

I am new to Javafx , i am working on javafx project . I want to minimise javafx window . i use primaryStage.initStyle(StageStyle.UNDECORATED); . I also want to add clickevent to the imageview in fxml.

Codelord
  • 1,120
  • 2
  • 10
  • 21

1 Answers1

0

I think this will work for you...

imgview.setOnMouseClicked(newEventHandler<MouseEvent>(){
    publicvoid handle(MouseEvent me){
        primaryStage.setIconified(true);
    }
});
Appleshell
  • 7,088
  • 6
  • 47
  • 96
Anshul Parashar
  • 3,096
  • 4
  • 30
  • 56