--- old/modules/graphics/src/main/java/com/sun/glass/ui/Window.java 2018-10-17 23:32:27.882328502 +0530 +++ new/modules/graphics/src/main/java/com/sun/glass/ui/Window.java 2018-10-17 23:32:27.734254502 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -295,6 +295,9 @@ if (this.ptr == 0L) { throw new RuntimeException("could not create platform window"); } + if (screen == null) { + screen = Screen.getMainScreen(); // start with a default + } } public boolean isClosed() {