Could you please provide some example how to use readXML
from CControl
?
I’m trying that:
final JPanel sample = new JPanel();
sample.add( new JButton( "no elo" ) );
sample.setVisible( true );
final CControl control = new CControl( frame );
control.readXML( new File( "layout.xml" ) );
final DefaultSingleCDockable dockable =
new DefaultSingleCDockable( "sampleId", sample );
control.addDockable( dockable );
dockable.setVisible( true );
and the result is the IllegalStateException: unable to find valid target, no history available
.
The layout.xml file was generated by writeXML
when the location for this element was set by CLocation
creating.
What am I missing?