On Mon, 21 Feb 2022 07:27:46 GMT, eduardsdv <d...@openjdk.java.net> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextInputControlSkin.java >> line 340: >> >>> 338: if (window == null) { >>> 339: return new Point2D(0, 0); >>> 340: } >> >> As long as each scene needs to be located in a window, the following will >> simplify the code: >> Suggestion: >> >> if (scene == null) { >> return new Point2D(0, 0); >> } >> Window window = scene.getWindow(); >> >> Is it possible to have a scene without an assigned window? > > Since the NullPointer occurs here because the synchronization between JavaFx > and AWT threads is not really possible in this case, we cannot ensure that > this method is only called when the scene is assigned to a window. > I would check here for null both the scene and the window. What a pity. Then ignore this comment. ------------- PR: https://git.openjdk.java.net/jfx/pull/735