added the if (parser == null) block..
why? Because I was using that and then suddenly it broke when I upgraded. I
have a class that makes a SwingEngine and then draws one or more windows
based on user decisions.. I don't think it should have to make a whole new
SwingEngine every time.
Was the decision to nullify it after use one based on RAM conservation?
-Kate
-------------------------------------------------------------------
public Container render( final Document jdoc ) throws Exception {
if (parser == null){
parser = new Parser( this );
}
try {
root = (Container) parser.parse( jdoc );
} catch (Exception e) {
System.err.println( e );
throw(e);
}
// dispose parser
parser = null;
// reset components collection
components = null;
// initialize all client fields with UI components by their id
mapMembers( client );
if (Frame.class.isAssignableFrom( root.getClass())) {
SwingEngine.setAppFrame((Frame)root );
}
return root;
}