Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void onMouseClicked(int x, int y, MouseEvent detail) {
- try{
- AudioInputStream ais = AudioSystem.getAudioInputStream(new File("shot.wav"));
- Clip clip = AudioSystem.getClip();
- clip.open(ais);
- clip.start();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (UnsupportedAudioFileException e) {
- e.printStackTrace();
- } catch (LineUnavailableException e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement