- beep_value.setVisible(new_beep >= 0);
- beep_label.setVisible(new_beep >= 0);
-
- int new_freq = (int) Math.floor (AltosConvert.beep_value_to_freq(new_beep) + 0.5);
- for (int i = 0; i < beep_values.length; i++)
- if (new_beep == AltosConvert.beep_freq_to_value(Integer.parseInt(beep_values[i]))) {
- beep_value.setSelectedIndex(i);
- set_beep_tool_tip();
- return;
- }
- beep_value.setSelectedItem(String.format("%d", new_freq));
- beep_value.setEnabled(new_beep >= 0);
+ if (new_beep != AltosLib.MISSING) {
+ int new_freq = (int) Math.floor (AltosConvert.beep_value_to_freq(new_beep) + 0.5);
+ for (int i = 0; i < beep_values.length; i++)
+ if (new_beep == AltosConvert.beep_freq_to_value(Integer.parseInt(beep_values[i]))) {
+ beep_value.setSelectedIndex(i);
+ set_beep_tool_tip();
+ return;
+ }
+ beep_value.setSelectedItem(String.format("%d", new_freq));
+ }
+ beep_value.setVisible(new_beep != AltosLib.MISSING);
+ beep_label.setVisible(new_beep != AltosLib.MISSING);