When waiting for the remote end to respond, display the callsign along
with the frequency so that the user remembers that it's important to
set that too.
Signed-off-by: Keith Packard <keithp@keithp.com>
Object[] options = { "Cancel" };
JOptionPane pane = new JOptionPane();
Object[] options = { "Cancel" };
JOptionPane pane = new JOptionPane();
- pane.setMessage(String.format("Connecting to %s, %7.3f MHz", device.toShortString(), frequency));
+ pane.setMessage(String.format("Connecting to %s, %7.3f MHz as %s", device.toShortString(), frequency, callsign));
pane.setOptions(options);
pane.setInitialValue(null);
pane.setOptions(options);
pane.setInitialValue(null);
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
ee.getMessage(),
} catch (FileNotFoundException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
ee.getMessage(),
- "Cannot open target device",
+ String.format ("Cannot open %s", device.toShortString()),
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
JOptionPane.showMessageDialog(AltosUI.this,
JOptionPane.ERROR_MESSAGE);
} catch (AltosSerialInUseException si) {
JOptionPane.showMessageDialog(AltosUI.this,
JOptionPane.ERROR_MESSAGE);
} catch (IOException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
JOptionPane.ERROR_MESSAGE);
} catch (IOException ee) {
JOptionPane.showMessageDialog(AltosUI.this,
- device.toShortString(),
- "Unkonwn I/O error",
+ String.format ("Unknown I/O error on %s", device.toShortString()),
+ "Unknown I/O error",
JOptionPane.ERROR_MESSAGE);
} catch (TimeoutException te) {
JOptionPane.showMessageDialog(this,
JOptionPane.ERROR_MESSAGE);
} catch (TimeoutException te) {
JOptionPane.showMessageDialog(this,
- device.toShortString(),
+ String.format ("Timeout on %s", device.toShortString()),
"Timeout error",
JOptionPane.ERROR_MESSAGE);
} catch (InterruptedException ie) {
JOptionPane.showMessageDialog(this,
"Timeout error",
JOptionPane.ERROR_MESSAGE);
} catch (InterruptedException ie) {
JOptionPane.showMessageDialog(this,
- device.toShortString(),
+ String.format("Interrupted %s", device.toShortString()),
"Interrupted exception",
JOptionPane.ERROR_MESSAGE);
}
"Interrupted exception",
JOptionPane.ERROR_MESSAGE);
}