• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sound in frame  RSS feed

 
Shawn Zhan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to I make a sound clip play when a frame is shown.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if your question is about the frame:
add your sound code after you create and show the frame, or
if you want the sound when (e.g.) the frame is restored after a minimize,
add a windowListener and use the appropriate method

if your question is about the code to play a sound:
search the forum/google there's lots of examples
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!