🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #196

Re: Problem showing an image in a JDialog ...

#196
From: Magnus
Date: Fri, 22 Sep 2006 14:42
21 lines
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
Technical Details
Message-ID: <4513f654$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news.gsl.net!gip.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!news.code-werk.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <4512e832@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,79cebbd9fb514ce
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 22 Sep 2006 10:42:40 -0400
From: Magnus <magnus_bjorkman@yahoo.com>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Problem showing an image in a JDialog ...
References: <4512e832@newsgroups.borland.com>
In-Reply-To: <4512e832@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.149.234.69
Message-ID: <4513f654$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158936148 24.149.234.69 (22 Sep 2006 07:42:28 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news-lond.gip.net!news.gsl.net!gip.net!colt.net!feeder.news-service.com!newsfeed.freenet.de!news.code-werk.net!news.soft-gems.net!open-news-network.org!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail