Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Magnus
Thu, 21 Sep 2006 19:30
Problem showing an image in a JDialog ...
Author: Magnus
Date: Thu, 21 Sep 2006 19:30
Date: Thu, 21 Sep 2006 19:30
16 lines
1405 bytes
1405 bytes
Hi, I have a JDialog where the user can select data to be sent to the report together with a logo (any image) that is part of the report. Now, I have a button that opens the FileChooser and the user can select the logo. To show what the logo looks like I added a Label and put the image (converted to an Icon) on it. Works great on small logos but when I pick a larger image it moves buttons and all in that panel (GBL). I tried with maximum size for the label but that didn't do anything. Is there a way to limit the size of my label or is there a better way to show the selected image? TIA
Re: Problem showing an image in a JDialog ...
Author: Magnus
Date: Fri, 22 Sep 2006 14:42
Date: Fri, 22 Sep 2006 14:42
21 lines
1961 bytes
1961 bytes
Solved it! I put a panel in the place of the label and then put the label inside the panel. The label will not stretch outside the panel. Magnus wrote: > Hi, > > I have a JDialog where the user can select data to be sent to the report > together with a logo (any image) that is part of the report. > > Now, I have a button that opens the FileChooser and the user can select > the logo. To show what the logo looks like I added a Label and put the > image (converted to an Icon) on it. Works great on small logos but when > I pick a larger image it moves buttons and all in that panel (GBL). > > I tried with maximum size for the label but that didn't do anything. > > Is there a way to limit the size of my label or is there a better way to > show the selected image? > > TIA
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