/*
  * Writes the preferences to the disk.
  */
 private void writePreferences() {
   prefs.setFullscreen(fullscreen.isSelected());
   prefs.setBitrate(bitrate.getValue());
   prefs.setResolution((Resolution) resolution.getSelectedItem());
   prefs.setUseOpenGlRenderer(openGlRenderer.isSelected());
   prefs.setLocalAudio(localAudio.isSelected());
   PreferencesManager.writePreferences(prefs);
 }
 /**
  * Construcs a new frame and loads the saved preferences. <br>
  * The frame is not made visible until a call to <br>
  * build()</br> is made.
  */
 public PreferencesFrame() {
   super("Preferences");
   this.setSize(350, 250);
   this.setResizable(false);
   prefs = PreferencesManager.getPreferences();
 }