blockView = new BlockDiagramView(800, 400, blockModel); mainSplitter.setTopComponent(blockView);
int width = getSize().width - callDetails.getSize().width; int height = getSize().height - callDetails.getSize().height; blockView = new BlockDiagramView(width, height, blockModel);  getContentPane().add(blockView, BorderLayout.CENTER);
	public boolean loadProfile(File profileFile)	{		LoadProgressDialog dlgLoad = new LoadProgressDialog(null, profileFile);		UIUtil.centerWindow(dlgLoad);		dlgLoad.setVisible(true);				CallGraph cg = dlgLoad.getCallGraph();		if ( cg == null )		{			System.err.println("Unable to load " + profileFile);			return false;		}		else		{			mainSplitter.remove(mainSplitter.getTopComponent());			if ( blockView != null )			{				blockView.cvsDispose();				blockModel.dispose();				blockModel = null;				System.gc();			}						blockModel = new BlockDiagramModel(cg);			blockModel.addListener(new PropertyChangeListener()				{					public void propertyChange(PropertyChangeEvent evt)					{						if ( BlockDiagramModel.RENDER_CALL_PROPERTY.equals(evt.getPropertyName()) )						{							enableControls();						}						else if ( BlockDiagramModel.SELECTED_CALL_PROPERTY.equals(evt.getPropertyName()) )						{							Call selectedCall = (Call)evt.getNewValue();							callDetails.selectedCallChanged(blockModel.getRootRenderState().getRenderCall(),																	  selectedCall);						}						else if ( BlockDiagramModel.NUM_LEVELS_PROPERTY.equals(evt.getPropertyName()) )						{							int levels = ((Integer)evt.getNewValue()).intValue();							depthSlider.setValue(levels);						}					}				});			blockModel.setLevels(depthSlider.getValue());			blockView = new BlockDiagramView(800, 400, blockModel);			mainSplitter.setTopComponent(blockView);			blockView.requestFocus();			pack();			enableControls();						return true;		}	}