Put pack and setVisible in the *right* place

This commit is contained in:
2018-09-11 11:43:14 +01:00
parent 9ef3ac930c
commit a49f7823b6
2 changed files with 13 additions and 7 deletions

View File

@@ -178,11 +178,6 @@ public class AudiobookRecorder extends JFrame {
setPreferredSize(new Dimension(700, 500));
setLocationRelativeTo(null);
pack();
setVisible(true);
}
public AudiobookRecorder() {
@@ -512,6 +507,9 @@ public class AudiobookRecorder extends JFrame {
centralPanel.add(mainScroll, BorderLayout.CENTER);
setTitle("AudioBook Recorder");
pack();
setVisible(true);
}
public static void main(String args[]) {

View File

@@ -344,10 +344,18 @@ public class Options extends JDialog {
KVPair[] recordingMixers = getRecordingMixerList();
KVPair[] playbackMixers = getPlaybackMixerList();
if (recordingMixers.length > 0) {
defaultPrefs.put("audio.recording.device", recordingMixers[0].key);
} else {
defaultPrefs.put("audio.recording.device", "");
}
defaultPrefs.put("audio.recording.channels", "2");
defaultPrefs.put("audio.recording.samplerate", "48000");
if (playbackMixers.length > 0) {
defaultPrefs.put("audio.playback.device", playbackMixers[0].key);
} else {
defaultPrefs.put("audio.playback.device", "");
}
defaultPrefs.put("catenation.pre-chapter", "2000");
defaultPrefs.put("catenation.post-chapter", "2000");