resizing images in a JLabel
I'm working on a "choose your own adventure" game that features a JLabel (actually an ImageLabel extended from JLabel) on which I add various ImageIcons. Press a button and a new ImageIcon appears on the display. I've been using an example from the Java Swing Tutorial as a template,
but I can't seem to find anything which addresses my particular problem:
The ImageIcons are loaded from JPGs of various sizes.
The ImageLabel is a fixed size. How do I resize the images to fit the label?
Thanx in advance,
"I want my two dollars!"
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL