setLayout(new BorderLayout());  m_MenuBar = new JMenuBar(); m_MenuBar.setLayout(new BorderLayout()); if(m_ObjectNames != null){ if(m_ObjectChooser == null) m_ObjectChooser = new CascadedComboBox(); m_MenuBar.add(m_ObjectChooser.getLabel(), BorderLayout.CENTER); }
setLayout(new BorderLayout());
	public GOEPanel() {	    m_Backup = copyObject(m_Object);	    //System.err.println("GOE()");	    m_ChildPropertySheet = new PropertySheetPanel();	    m_ChildPropertySheet.addPropertyChangeListener		(new PropertyChangeListener() {			public void propertyChange(PropertyChangeEvent evt) {			    m_Support.firePropertyChange("", null, null);			}		    });	    	    m_OpenBut = new JButton("Open...");	    m_OpenBut.setToolTipText("Load a configured object");	    m_OpenBut.setEnabled(true);	    m_OpenBut.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent e) {			Object object = openObject();			if (object != null) {			    // setValue takes care of: Making sure obj is of right type,			    // and firing property change.			    setValue(object);			    // Need a second setValue to get property values filled in OK.			    // Not sure why.			    setValue(object);			}		    }		});	    	    m_SaveBut = new JButton("Save...");	    m_SaveBut.setToolTipText("Save the current configured object");	    m_SaveBut.setEnabled(true);	    m_SaveBut.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent e) {			saveObject(m_Object);		    }		});	    	    m_okBut = new JButton("OK");	    m_okBut.setEnabled(true);	    m_okBut.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent e) {			m_Backup = copyObject(m_Object);			if ((getTopLevelAncestor() != null)			    && (getTopLevelAncestor() instanceof Window)) {			    Window w = (Window) getTopLevelAncestor();			    w.dispose();			}		    }		});	    	    m_cancelBut = new JButton("Cancel");	    m_cancelBut.setEnabled(true);	    m_cancelBut.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent e) {			if (m_Backup != null) {			    m_Object = copyObject(m_Backup);			    setObject(m_Object);			    updateClassType();			    updateChooser();			    updateChildPropertySheet();			}			if ((getTopLevelAncestor() != null)			    && (getTopLevelAncestor() instanceof Window)) {			    Window w = (Window) getTopLevelAncestor();			    w.dispose();			}		    }		});	    	    setLayout(new BorderLayout());	    	    m_MenuBar = new JMenuBar();	    m_MenuBar.setLayout(new BorderLayout());		    if(m_ObjectNames != null){		if(m_ObjectChooser == null)		    m_ObjectChooser = new CascadedComboBox();				m_MenuBar.add(m_ObjectChooser.getLabel(), BorderLayout.CENTER); 	    }	    	    add(m_MenuBar, BorderLayout.NORTH);	    add(m_ChildPropertySheet, BorderLayout.CENTER);	    // Since we resize to the size of the property sheet, a scrollpane isn't	    // typically needed	    // add(new JScrollPane(m_ChildPropertySheet), BorderLayout.CENTER);	    	    JPanel okcButs = new JPanel();	    okcButs.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));	    okcButs.setLayout(new GridLayout(1, 4, 5, 5));	    okcButs.add(m_OpenBut);	    okcButs.add(m_SaveBut);	    okcButs.add(m_okBut);	    okcButs.add(m_cancelBut);	    add(okcButs, BorderLayout.SOUTH);	    	    if (m_ClassType != null) {		updateClassType();		if(m_Object != null){		    updateChooser();		    updateChildPropertySheet();		}	    }	}