|
-
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,
IconDemoApplet: http://java.sun.com/docs/books/tutor...misc/icon.html
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,
slp
"I want my two dollars!"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks