Minimize window in javafx2


Question

i have undecorate the window in javafx2. Now i want to minimize the window by means of the action. This is my code

    minIcon.setOnMouseClicked(new EventHandler<MouseEvent>() {
        public void handle(MouseEvent me) {
            primaryStage.toBack();
        }
    });

The window is go back when another one is open. otherwise its not. pls let me know how how to do this?

1
9
12/13/2012 6:32:13 AM

After searching for some times i found answer myself.

minIcon.setOnMouseClicked(new EventHandler<MouseEvent>() {
    public void handle(MouseEvent me) {
        primaryStage.setIconified(true);
    }
});

This works fine..

36
12/13/2012 6:56:51 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon