Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void prepareAudio() {
- try {
- InputStream is = getClass().getClassLoader().getResourceAsStream("beep.wav");
- InputStream buffer = new BufferedInputStream(is);
- inputStream = AudioSystem.getAudioInputStream(buffer);
- clip = AudioSystem.getClip();
- clip.open(inputStream);
- } catch (Exception ex) {
- ex.printStackTrace();
- JOptionPane.showMessageDialog(null, "Houve um problema a preparar o audio do programa!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement