private JCheckBox getEnableWallCollisionCheckBox() {
   if (enableWallCollisionCheckBox == null) {
     enableWallCollisionCheckBox = new JCheckBox("Wall Collisions");
     enableWallCollisionCheckBox.setMnemonic('l');
     enableWallCollisionCheckBox.setDisplayedMnemonicIndex(2);
   }
   return enableWallCollisionCheckBox;
 }
 private JCheckBox getEnableMixerPanCheckBox() {
   if (enableMixerPanCheckBox == null) {
     enableMixerPanCheckBox = new JCheckBox("Pan");
     enableMixerPanCheckBox.setMnemonic('P');
     enableMixerPanCheckBox.addActionListener(eventHandler);
   }
   return enableMixerPanCheckBox;
 }
 private JCheckBox getEnableRobotCollisionCheckBox() {
   if (enableRobotCollisionCheckBox == null) {
     enableRobotCollisionCheckBox = new JCheckBox("Robot Collisions");
     enableRobotCollisionCheckBox.setMnemonic('t');
     enableRobotCollisionCheckBox.setDisplayedMnemonicIndex(4);
   }
   return enableRobotCollisionCheckBox;
 }
 private JCheckBox getEnableRobotDeathCheckBox() {
   if (enableRobotDeathCheckBox == null) {
     enableRobotDeathCheckBox = new JCheckBox("Robot Death Explosions");
     enableRobotDeathCheckBox.setMnemonic('x');
     enableRobotDeathCheckBox.setDisplayedMnemonicIndex(13);
   }
   return enableRobotDeathCheckBox;
 }
 private JCheckBox getEnableBulletHitCheckBox() {
   if (enableBulletHitCheckBox == null) {
     enableBulletHitCheckBox = new JCheckBox("Bullet Hit");
     enableBulletHitCheckBox.setMnemonic('H');
     enableBulletHitCheckBox.setDisplayedMnemonicIndex(7);
   }
   return enableBulletHitCheckBox;
 }
 private JCheckBox getEnableGunshotCheckBox() {
   if (enableGunshotCheckBox == null) {
     enableGunshotCheckBox = new JCheckBox("Gun Shots");
     enableGunshotCheckBox.setMnemonic('G');
   }
   return enableGunshotCheckBox;
 }
 private JCheckBox getEnableSoundCheckBox() {
   if (enableSoundCheckBox == null) {
     enableSoundCheckBox = new JCheckBox("Enable Sound");
     enableSoundCheckBox.setMnemonic('E');
   }
   return enableSoundCheckBox;
 }
  private void mixerComboBoxActionPerformed() {
    Mixer mixer = AudioSystem.getMixer((Mixer.Info) mixerComboBox.getSelectedItem());

    Line.Info lineInfo = mixer.getSourceLineInfo(new Line.Info(Clip.class))[0];

    boolean volumeSupported;
    boolean panSupported;

    try {
      Line line = mixer.getLine(lineInfo);

      volumeSupported = line.isControlSupported(FloatControl.Type.MASTER_GAIN);
      panSupported = line.isControlSupported(FloatControl.Type.PAN);
    } catch (LineUnavailableException e) {
      volumeSupported = false;
      panSupported = false;
    }

    enableMixerVolumeCheckBox.setEnabled(volumeSupported);
    enableMixerPanCheckBox.setEnabled(panSupported);
  }
 private void setAllSoundsButtonsEnabled(boolean enabled) {
   enableSoundCheckBox.setSelected(enabled);
   enableGunshotCheckBox.setSelected(enabled);
   enableBulletHitCheckBox.setSelected(enabled);
   enableRobotDeathCheckBox.setSelected(enabled);
   enableWallCollisionCheckBox.setSelected(enabled);
   enableRobotCollisionCheckBox.setSelected(enabled);
 }