metronomeInfo=(MidiDevice.Info)metronomeOutBox.getSelectedItem();
}
this.keyInIndex=keyboardInBox.getSelectedIndex();
uc.putProperty(KEYBOARD_IN_DEVICE, keyInIndex);
MidiDevice.Info keyInfo=(MidiDevice.Info)keyboardInBox.getSelectedItem();
MidiDevice metroDev=null;
if (metronomeInfo!=null) {
metroDev=MidiSystem.getMidiDevice(metronomeInfo);
if (metroDev.getMaxReceivers()==0) {
JOptionPane.showMessageDialog(ctx.getDefaultDialogOwner(),
ResourceFactory.getString(MESSAGE_NO_RECEIVER),
ResourceFactory.getString(TITLE_MIDI_INIT_FAILED),
JOptionPane.ERROR_MESSAGE);
}
}
MidiDevice outDev=MidiSystem.getMidiDevice(outInfo);
if (outDev.getMaxReceivers()==0) {
JOptionPane.showMessageDialog(ctx.getDefaultDialogOwner(),
ResourceFactory.getString(MESSAGE_NO_RECEIVER),
ResourceFactory.getString(TITLE_MIDI_INIT_FAILED),
JOptionPane.ERROR_MESSAGE);
}
MidiDevice keyDev=MidiSystem.getMidiDevice(keyInfo);
if (keyDev.getMaxTransmitters()==0) {
JOptionPane.showMessageDialog(ctx.getDefaultDialogOwner(),
ResourceFactory.getString(MESSAGE_NO_TRANSMITTER),
ResourceFactory.getString(TITLE_MIDI_INIT_FAILED),
JOptionPane.ERROR_MESSAGE);
}