PatchEdit.dupAction.setEnabled(true);
PatchEdit.deleteDuplicatesAction.setEnabled(true);
    protected void InitBankEditorFrame() {        //...Create the GUI and put it in the window...        myModel = new PatchGridModel(bankData, bankDriver);        table = new JTable(myModel);        table2 = table;	table.setTransferHandler(pth);	table.setDragEnabled(true);	//table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);        table.setPreferredScrollableViewportSize(preferredScrollableViewportSize);        //table.setRowSelectionAllowed(false);        //table.setColumnSelectionAllowed(false);	table.setCellSelectionEnabled(true);	table.setAutoResizeMode(autoResizeMode);	ListSelectionListener lsl = new ListSelectionListener() {		public void valueChanged(ListSelectionEvent e) {		    enableMenus();		}	    };	table.getSelectionModel().addListSelectionListener(lsl);	table.getColumnModel().getSelectionModel().addListSelectionListener(lsl);        table.addMouseListener(new MouseAdapter() {		public void mousePressed(MouseEvent e) {		    if (e.isPopupTrigger())			PatchEdit.showMenuPatchPopup(table2, e.getX(), e.getY());		}		public void mouseReleased(MouseEvent e) {		    if (e.isPopupTrigger())			PatchEdit.showMenuPatchPopup(table2, e.getX(), e.getY());		}		public void mouseClicked(MouseEvent e) {		    if (e.getClickCount() == 2)			PlaySelectedPatch();		}	    });        this.addJSLFrameListener(new JSLFrameListener() {		public void JSLFrameOpened(JSLFrameEvent e) {		}		public void JSLFrameClosed(JSLFrameEvent e) {		}		public void JSLFrameDeiconified(JSLFrameEvent e) {		}		public void JSLFrameIconified(JSLFrameEvent e) {		}		public void JSLFrameActivated(JSLFrameEvent e) {		    	PatchEdit.receiveAction.setEnabled(false);			PatchEdit.importAction.setEnabled(true);			PatchEdit.importAllAction.setEnabled(true);			PatchEdit.newPatchAction.setEnabled(true);			if (table.getRowCount() > 0) {			    PatchEdit.saveAction.setEnabled(true);			    PatchEdit.saveAsAction.setEnabled(true);			    PatchEdit.searchAction.setEnabled(true);			}			if (table.getRowCount() > 1) {			    PatchEdit.sortAction.setEnabled(true);			    PatchEdit.dupAction.setEnabled(true);			}		    enableMenus();		}		public void JSLFrameClosing(JSLFrameEvent e) {		    JSLFrame[] jList = JSLDesktop.getAllFrames();		    for (int j = 0; j < jList.length; j++)			if (jList[j] instanceof PatchEditorFrame) {			    if (((PatchEditorFrame) (jList[j])).bankFrame == instance) {				jList[j].moveToFront();				try {				    jList[j].setSelected(true);				    jList[j].setClosed(true);				} catch (Exception e1) {				}			    }			}		}		public void JSLFrameDeactivated(JSLFrameEvent e) {		    disableMenus();		}	    });        //Create the scroll pane and add the table to it.        JScrollPane scrollPane = new JScrollPane(table);	scrollPane.getViewport()	    .setTransferHandler(new ProxyImportHandler(table, pth));        //Add the scroll pane to this window.        getContentPane().add(scrollPane, BorderLayout.CENTER);	for (int col = 0; col < table.getColumnCount(); col++) {	    TableColumn column = table.getColumnModel().getColumn(col);	    column.setPreferredWidth(preferredColumnWidth);	}        //...Then set the window size or call pack...        setSize(600, 300);        //Set the window's location.	moveToDefaultLocation();    }