PatchEdit.showMenuPatchPopup(table2, e.getX(), e.getY());
Actions.showMenuPatchPopup(table2, e.getX(), e.getY());
    private JTable createTable() {        myModel = new SceneListModel(changed);        final JTable table = new JTable(myModel);        table2 = table;		// What's this?        rowEditor = new SceneTableCellEditor(table);        table.setPreferredScrollableViewportSize(new Dimension(500, 70));	table.addMouseListener(new MouseAdapter() {		public void mousePressed(MouseEvent e) {		    if (e.isPopupTrigger()) {			PatchEdit.showMenuPatchPopup(table2, e.getX(), e.getY());			table2.setRowSelectionInterval			    (table2.rowAtPoint(new Point(e.getX(), e.getY())),			     table2.rowAtPoint(new Point(e.getX(), e.getY())));		    }		}		public void mouseReleased(MouseEvent e) {		    if (e.isPopupTrigger()) {			PatchEdit.showMenuPatchPopup(table2, e.getX(), e.getY());			table2.setRowSelectionInterval			    (table2.rowAtPoint(new Point(e.getX(), e.getY())),			     table2.rowAtPoint(new Point(e.getX(), e.getY())));		    }		}		public void mouseClicked(MouseEvent e) {		    if (e.getClickCount() == 2) {			playSelectedPatch();		    }		}	    });	//table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);	table.setTransferHandler(pth);	table.setDragEnabled(true);        TableColumn column = null;        column = table.getColumnModel().getColumn(SYNTH);        column.setPreferredWidth(50);        column = table.getColumnModel().getColumn(TYPE);        column.setPreferredWidth(50);        column = table.getColumnModel().getColumn(PATCH_NAME);        column.setPreferredWidth(100);        column = table.getColumnModel().getColumn(BANK_NUM);        column.setPreferredWidth(50);        column.setCellEditor(rowEditor); // Set the special pop-up Editor for Bank numbers        column = table.getColumnModel().getColumn(PATCH_NUM);        column.setPreferredWidth(50);        column.setCellEditor(rowEditor); // Set the special pop-up Editorfor Patch Numbers        column = table.getColumnModel().getColumn(COMMENT);        column.setPreferredWidth(200);        table.getModel().addTableModelListener(new TableModelListener() {		public void tableChanged(TableModelEvent e) {		    statusBar.setText(myModel.getRowCount() + " Patches");		    /*		    int c = ((AbstractPatchListModel) e.getSource()).getRowCount();		    PatchEdit.setEnabled(c > 0,					 Actions.EN_EXPORT					 | Actions.EN_SAVE					 | Actions.EN_SAVE_AS					 | Actions.EN_SEARCH 					 | Actions.EN_TRANSFER_SCENE);		    PatchEdit.setEnabled(c > 1,					 Actions.EN_CROSSBREED					 | Actions.EN_DELETE_DUPLICATES					 | Actions.EN_SORT);		    */		    enableActions();		}	    });        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {		public void valueChanged(ListSelectionEvent e) {		    //ErrorMsg.reportStatus ("ValueChanged"+((ListSelectionModel)e.getSource ()).getMaxSelectionIndex ());		    /*		    int i = ((ListSelectionModel) e.getSource()).getMaxSelectionIndex();		    PatchEdit.setEnabled(i >= 0,					 Actions.EN_COPY					 | Actions.EN_CUT					 | Actions.EN_DELETE					 | Actions.EN_EXPORT					 | Actions.EN_EXTRACT					 | Actions.EN_PLAY					 | Actions.EN_REASSIGN					 | Actions.EN_SEND					 | Actions.EN_SEND_TO					 | Actions.EN_STORE					 | Actions.EN_UPLOAD);		    PatchEdit.setEnabled(i >= 0					 && myModel.getPatchAt(table.getSelectedRow()).getDriver().hasEditor(),					 Actions.EN_EDIT);		    */		    enableActions();		}	    });	return table;    }