scan.setEnabled(PatchEdit.MidiOut.supportsScanning());
scan.setEnabled(MidiWrapper.supportsScanning());
    public SynthConfigDialog (JFrame parent) {        super(parent, "Synthesizer Configuration", true);        JPanel container = new JPanel ();        container.setLayout (new BorderLayout ());        SynthTableModel dataModel = new SynthTableModel ();        JTable table = new JTable (dataModel);        table2 = table;        table.setPreferredScrollableViewportSize (new Dimension (650, 150));        JScrollPane scrollpane = new JScrollPane (table);        container.add (scrollpane, BorderLayout.CENTER);        TableColumn column = null;        column = table.getColumnModel ().getColumn (0);        column.setPreferredWidth (75);        column = table.getColumnModel ().getColumn (1);        column.setPreferredWidth (250);        column = table.getColumnModel ().getColumn (2);        column.setPreferredWidth (150);	JComboBox comboBox;	if (PatchEdit.newMidiAPI)	    comboBox = new JComboBox(MidiUtil.getInputMidiDeviceInfo());	else {	    comboBox = new JComboBox();	    try {		for (int j = 0; j < PatchEdit.MidiOut.getNumInputDevices (); j++)		    comboBox.addItem (j + ": " + PatchEdit.MidiOut.getInputDeviceName (j));	    } catch (Exception e) {		ErrorMsg.reportStatus(e);	    }	}	column.setCellEditor (new DefaultCellEditor (comboBox));        column = table.getColumnModel ().getColumn (3);        column.setPreferredWidth (150);	if (PatchEdit.newMidiAPI)	    comboBox = new JComboBox(MidiUtil.getOutputMidiDeviceInfo());	else {	    comboBox = new JComboBox();	    try {		for (int j = 0; j < PatchEdit.MidiOut.getNumOutputDevices (); j++)		    comboBox.addItem (j + ": " + PatchEdit.MidiOut.getOutputDeviceName (j));	    } catch (Exception e) {		ErrorMsg.reportStatus(e);	    }	}	column.setCellEditor (new DefaultCellEditor (comboBox));        column = table.getColumnModel ().getColumn (4);        column.setPreferredWidth (75);        JPanel buttonPanel = new JPanel ();        buttonPanel.setLayout (new FlowLayout (FlowLayout.CENTER));        // BUTTON ADDED BY GERRIT GEHNEN        JButton scan = new JButton ("Auto-Scan");        scan.addActionListener (new ActionListener () {		public void actionPerformed (ActionEvent e) {		    scanPressed ();		}	    });	// I changed this around a little bit. First, we're no longer comparing against	// individual midi wrappers (like JavaMidiWrapper). Second, the scan button is	// *always* there... it's just either enabled or disabled. Having GUI items appear	// and disappear is probably not a good idea, because a user might go back to where	// they *think* they saw a button once, and not find it... leading to general	// confusion regarding the interface. - emenaker 2003.03.13	buttonPanel.add (scan);	scan.setEnabled(PatchEdit.MidiOut.supportsScanning());        // END OF ADDED BUTTON        JButton add = new JButton ("Add Device");        add.addActionListener (new ActionListener () {		public void actionPerformed (ActionEvent e) {		    addPressed ();		}	    });        buttonPanel.add (add);        JButton rem = new JButton ("Remove Device");        rem.addActionListener (new ActionListener () {		public void actionPerformed (ActionEvent e) {		    removePressed ();		}	    });        buttonPanel.add (rem);        JButton detail = new JButton ("Show Details");        detail.addActionListener (new ActionListener () {		public void actionPerformed (ActionEvent e) {		    detailPressed ();		}	    });        buttonPanel.add (detail);        JButton ok = new JButton ("Close");        ok.addActionListener (new ActionListener () {		public void actionPerformed (ActionEvent e) {		    OKPressed ();		}	    });        buttonPanel.add (ok);        getRootPane ().setDefaultButton (ok);        container.add (buttonPanel, BorderLayout.SOUTH);        getContentPane ().add (container);        pack ();        centerDialog ();    }