Serializing JFXPanel with java.beans.XMLEncoder

Lidierth, Malcolm malcolm.lidierth at kcl.ac.uk
Wed Nov 6 08:45:03 PST 2013


OK - the original null pointer exception was because of the issue with WebView that is now on JIRA.

I now get a more easily understood exception:

java.lang.NoSuchMethodException: javafx.scene.Scene.<init>()javafx.scene.Scene

as Scene has no null constructor.

So I guess my question now relates to optimism: the beans encoder handles JFXPanel fine, but
am I right that  I will need to populate that JFXPanel by writing my own classes/delegates to create the scene - and that standard FX components do not have ready-made delegates as do the Swing components that will be invoked through the get/set methods using a default persistence delegate? I guess that would be asking a lot.




________________________________________
From: Artem Ananiev <artem.ananiev at oracle.com>
Sent: Tuesday, November 05, 2013 5:21 PM
To: Lidierth, Malcolm
Cc: openjfx-dev at openjdk.java.net
Subject: Re: Serializing JFXPanel with java.beans.XMLEncoder

Hi, Lidierth,

could you provide the exception stack trace, please? It would help to
understand whether you're over-optimistic or not :)

Thanks,

Artem

On 11/5/2013 9:14 PM, Lidierth Malcolm wrote:
> When I add a JFXPanel to a Swing hierarchy that is then written to XML
> using java.beans.XMLEncoder, all is well as long as the JFXPanel is empty.
> When it has content, I see a NullPointerException.
>
> Before I dig into the origins, am I being over-optimistic? : should I
> expect java.beans.XMLEncoder to cope here?
>
> ML
>


More information about the openjfx-dev mailing list