Chapter 3
Using Images and Sound
In This Chapter
Displaying images in Swing components
Drawing images directly on a panel
Scaling images
Using a file chooser to pick an image
Adding annoying sound effects and music to your programs
So far in this book, all the Swing applications have been pretty boring. They've had plenty of labels, text fields, combo boxes, and the like, but no pictures!
This chapter remedies that situation. You find out how to incorporate graphic images (that is, pictures — not necessarily images of a graphic nature) into your Swing applications. Just to make things interesting, I show you how to throw in sound effects and music, too.
Get Java All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.