RFR: 8281953: NullPointer in InputMethod components in JFXPanel
delvh
duke at openjdk.java.net
Sat Feb 19 17:52:53 UTC 2022
On Thu, 17 Feb 2022 12:57:27 GMT, eduardsdv <duke at openjdk.java.net> wrote:
> If the InputMethod's node is not in the scene, the default text location point is returned.
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?
-------------
PR: https://git.openjdk.java.net/jfx/pull/735
More information about the openjfx-dev
mailing list