Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Javafx 的新手,我正在研究 javafx 项目。我想最小化 javafx 窗口。我使用 primaryStage.initStyle(StageStyle.UNDECORATED); . 我还想将 clickevent 添加到 fxml 中的 imageview 中。
我认为这对你有用......
imgview.setOnMouseClicked(newEventHandler<MouseEvent>(){ publicvoid handle(MouseEvent me){ primaryStage.setIconified(true); } });