Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Jose Luis
Mon, 01 Mar 2004 08:28
How to fit a image into a JButton
Author: Jose Luis
Date: Mon, 01 Mar 2004 08:28
Date: Mon, 01 Mar 2004 08:28
17 lines
1250 bytes
1250 bytes
Hi everybody Perhaps someone konws how to resize an image in order to fit into a Jbutton. JButton JB=new JButton(); JB.setIcon (Img) // Img has been loaded previously But, o my good, the image is bigger than JB size, and it is shown only parcially I need to zoom in/out the image and transform its size into jbutton dimensions. Does anybody know how to do this? Regards Jose Luis
Re: How to fit a image into a JButton
Author: Tor Iver Wilhelmsen (TeamB)
Date: Mon, 01 Mar 2004 09:15
Date: Mon, 01 Mar 2004 09:15
6 lines
1042 bytes
1042 bytes
"Jose Luis" <jherrero@unex.es> writes: > I need to zoom in/out the image and transform its size into jbutton > dimensions. Does anybody know how to do this? There are image filters in java.awt.image.* you can use.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads