-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
8
-
None
-
JavaFX 8b106, Windows7
When a stage is maximized -> iconified -> restored, the iconifiedProperty of the stage won't get properly updated. The test below demonstrates the behavior - when the stage is iconified newValue is true, when the stage is restored the listener does not receive any event.The issue does not occur if the stage is not maximized.
public class IconifiedPropertyTest extends Application
{
public static void main(String[] args)
{
Application.launch(IconifiedPropertyTest.class, args);
}
@Override
public void start(Stage stage)
{
stage.iconifiedProperty().addListener(new ChangeListener<Boolean>()
{
@Override
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue)
{
System.err.println("isIconified: " + newValue);
}
});
BorderPane root = new BorderPane();
Scene scene = new Scene(root, 800, 600);
stage.setScene(scene);
//iconifiedProperty works fine if window is not maximized
stage.setMaximized(true);
stage.show();
}
}
public class IconifiedPropertyTest extends Application
{
public static void main(String[] args)
{
Application.launch(IconifiedPropertyTest.class, args);
}
@Override
public void start(Stage stage)
{
stage.iconifiedProperty().addListener(new ChangeListener<Boolean>()
{
@Override
public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue)
{
System.err.println("isIconified: " + newValue);
}
});
BorderPane root = new BorderPane();
Scene scene = new Scene(root, 800, 600);
stage.setScene(scene);
//iconifiedProperty works fine if window is not maximized
stage.setMaximized(true);
stage.show();
}
}
- duplicates
-
JDK-8094589 iconifiedProperty not correctly updated when the application is maximized
-
- Closed
-