public void load(File f) throws IOException, SerializationException, ParserConfigurationException, SAXException {
BXMLSerializer serializer = new BXMLSerializer();
serializer.setLocation(f.toURI().toURL());
final FileInputStream in = new FileInputStream(f);
try {
Object obj = serializer.readObject(in);
if (!(obj instanceof Component)) {
throw new IllegalStateException("obj " + obj + " is of class " + obj.getClass()
+ " which is not a subtype of Component");
}
// create an inverse map so we can IDs for widgets