Why all images shrink into a small dot in FlowLayout??

Dear friends:
When I use BorderLayout and GridLayout in JPanel, all images and JLabel are shown up properly,
but when I change Layout to FlowLayout, JLabel still display, but all
all images shrink into a small dot in FlowLayout, what is wrong??
Why all images shrink into a small dot in FlowLayout??
Thanks
sunny

It is probarbly overkill to set all those, but I guess its better to be save than sorry. No, it is not better to be safe than sorry. It is better to understand how LayoutManagers work. Adding unnecessary code will cause confusion as people maintaining the code will wonder why the code is there.
There is not need to invoke any of the sizing methods. The preferred size of the lable will be the size of the image. So if the image is loaded correctly there is nothing that has to be done.
any new idea??Your where given an idea. Post your SSCCE. No SSCCE. The code you posted is incomplete. We have no idea what your getImage(...) method does or for that matter why you even have a getImage() method. If you would read the Swing tutorial on "Using Labels" or "Using Icons" then you would find working examples.

Similar Messages

  • Why do images brought into flash from a psd appear differently when publish

    I am creating a flash banner using a layered psd.  The account team is happy with the look of the psd. BUT, when I bring the images into flash and publish the file, the colors look different.  I import them into flash at the highest quality yet they don't look the same.  Any advice?

    The answer relates to color spaces (profiles) and color management in Flash.
    In the other creative suite applications you work with a color space to define the colors your using—i.e., if you have #ff0000 full red this will be a different color in sRGB (an RGB color space) than Adobe 1998 (a different RGB color space). You need to have a color space (profile) to make sense of the color values.
    Flash doesn't honor profiles currently, which means it ignores these profiles. By default in Flash Player 10, and the only option in all players before 10, it gives these color numbers to the operating system without a color space, so the operating system is in charge of making sense of these numbers. In Windows it will assume these numbers are in the sRGB color space, on Mac it will assume that these numbers are in the monitor's color space (on my macbook this is Color LCD, which I believe is the color space for all macbooks by default).
    The way to get the colors to look the best in Flash is to make sure that the document is sRGB before you bring it into Flash. In Photoshop you can convert the colors into the sRGB color space, which will change these color values into the sRGB color space, by going to Edit -> Convert to Profile, and find sRGB in the RGB dropdown. Another way to do it if you are saving just a flat image is to use File -> Save For Web & Devices and check the Convert to sRGB checkbox on the right. Now when you bring the image in to Flash and publish it it should look right on Windows, and probably better on Mac.
    Flash Player 10 adds a feature where you can say that all the images are in the sRGB color space and it will hand the color values to the operating system as sRGB numbers. This makes it work better on Mac, if the swf file is viewed in an environment that honors profiles (Mac and Windows honor profiles but most browsers still ignore profiles, but that's getting better). You can turn this feature on by putting this code into your Flash file: stage.colorCorrection = ColorCorrection.ON;. Read more on that at this link: http://blogs.adobe.com/jnack/2008/10/get_better_color_through_fp10.html. I also gave a presentation on color management and blogged about it, which you can read about and watch here: http://blog.elliselkins.com/2009/02/flying-through-color-space-uflash.html.
    Feel free to ask me anything. Hope this helps.

  • HT201317 Why all images are not loaded to photostream, many new images are missing ?

    I took many images with iphone 5 during a holiday trip, but some latest images from trip where not loaded to photostream and some images after that where loaded, why ?

    Hello, you may like article on iCloud: Photo Stream Troubleshooting: http://support.apple.com/kb/TS3989 the article has different scenarios that direct you on how to best troubleshoot.

  • Why are images converted into pdfs instead of jpgs?

    When saving an image that's been corrected, as a jpg, it is automatically converted to a PDF.
    Some sites I use will only accept jpg files.  Where can I change this feature in acrobat XI?

    If it is as you describe then this is a problem with the OTHER program. Acrobat can't change how other programs save their files.
    There is another possibility, that the file is actually a JPEG but your system is set up wrong, so that Acrobat is run when you double click JPEGs.
    You can look in File Properties to see which this is. But have you asked in the forum for the "other" program?

  • Why are my Jpg files so small after being saved from Nef

    Hi,
    I am finally posting after months of trying to figure out why my images are saving so small, some 4mb after converting from Nef to Jpg.
    I am shooting with a Nikon D4s and came from a D800. I was spoilt with really large file sizes and now I am freaking out because my jpegs are so small.
    I am checking all the right boxes as far as I can see to save the jpg as large as I can, and I am not cropping the images before saving as Jpg.
    Has anyone else had this problem? I can't understand why a camera as amazing as the D4s is giving me such small files. I have read everywhere that my files need to be over 6mb to be classed as high res.
    The only thing that I can think of is maybe I am pushing my nefs too hard in camera raw/lightroom resulting in a loss of quality? Although my exposure is correct 90% of the time so Im only playing with highlights or luminance.
    Can anyone walk me through the process of what I should be doing so I can end this headache!
    Thanks in advance!

    ashleyp1563 wrote:
    Images are 16pm (4928x3280px as you say), and the doc is 48mb.
    So here's where I really show myself up... am I right in assuming that the more adobe compresses an image the lower the mb is on the final file, meaning if there is less detail (i.e. the low-key image is predominately black) then the jpeg will be smaller. Does this affect the print quality?
    4mb seems very low res to me. How can I retain as much of the information as possible? Do you think I should sharpen more to retain detail? Or does it even matter and I'm fretting over nothing!
    Okay. The file dimensions are fine, so we're talking purely about content and compression.
    As I already said, the low-key image contains very little data in the first place (lots of black and no colour), so it compresses well.  The dreamy woman image contains a lot of plain blue sky and out-of-focus background, so that compresses well too. No surprises there.
    Have you got any more detailed images with greater depth of field? Try creating a JPEG of that and see how big the file is.
    An Adobe JPEG Quality setting of 12 means minimum compression and therefore maximum file size. But, even so, if you saved an image which was just a single plain colour, you would find that the resulting JPEG would be just a few kB. This is how compression works.
    The lower the quality number is set, the higher the compression, the more detail is lost, and the more JPEG artefacts are created in the image.  You are already saving at 12 quality, which is the highest setting, so you are minimising any problems with detail. You should save as TIFF if you want absolutely no loss of detail, but the file sizes are much bigger.
    4MB is not a resolution. Think of it as packing a suitcase. If you're taking lots of books, you won't get the lid down. If you're taking lots of soft woollen sweaters, you can take lots. 4MB is an indication of the space that your packed image takes—if it's made of light fluffy stuff then it will be a smaller suitcase! :-)
    You should sharpen your images the same as any other. Large areas of plain or out-of-focus background need not be sharpened. You're okay. Stop worrying!

  • How do I move back photos from an external drive (but iPhoto library on Mac hd) to the Mac HD without reimporting all images again in iPhoto?

    The following scenario:
    Mac HD: iPhoto Libary
    External HD: all photos which are shown in iPhoto
    now I want to copy back the photos from the external HD to the mac hd and I want iPhoto to know the new location of all these photos (couple of 10 thounsands)
    How do I do that without reimporting all images again into iPhoto
    Thanks

    do you have a default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or referenced library (you have unchecked that option)
    What version of iPhoto?
    Do you have Aperature 3.3?
    LN

  • In my Macbook Pro finder folder under All Images, there are duplicate files, but one is small and the other is full size. I wanted to clean up the files, but don't know why I have two of everything. Any Ideas?

    In my Macbook Pro, the Finder folder has duplicate images in the 'all images' file. One image is small and the other is full size. First question is why do I have two of every image? Why is one small and the other large. Do I need two of everything? If not, which do I delete?
    thanks, Jean

    Hello fane,
    Re: duplicate images in finder.
    Nearly all images are JPG with a few GIF and PNG sprinkled in.
    I opened the inspector so I do get info when opening each image, but it a slow process.
    It seems that one image is around 70k while its twin can be up to 4Mb which is what comes unedited from my camera. Sometimes there will be 3 or 4 identical images in finder, but when I open iPhoto to see what ‘s really in the file, I find only one image, and it’s full sized.
    Are all these extra images, even if they are aliases, taking up space on my drive? And should I delete them? The info bar says I have over 10,000 images, which is rather a lot  for what I do.
    I am unable to add the file size on the view menu as it is grayed out. Don’t know why it’s gray, but having that info on the screen would save a lot of time and fiddling with each image.
    I am trying to resize selected pix so I can upload them to e-bay, which requires less than 70k. I have looked at resizing programs but most are for PC platform and not Mac, so I am trying to resize in the finder window under tools. Tedious at best. Any suggestions will be appreciated
    Thanks for your help,
    jeanfromwilsonville

  • Why firefox 3.6.13 when I click on a link put small dots all around it?

    When I instaled new version of firefox it started to put small dots around links when i click on them . This bugs me because on my webpage this looks ugly.
    Thanks for your answers.
    Dario

    You can stop this by changing a hidden preference.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.display.focus_ring_width''', double-click on it and change its value to '''0''' (zero).
    For more details on that preference see http://kb.mozillazine.org/Browser.display.focus_ring_width

  • Why does ibooks author automatically resize all images of a gallery?

    The point here is, I have more than one graphic files (not pictures taken by a camera) to put into one gallery widget of an iBooks Author document. Unfortunately, not all figures have the same height/width aspect ratio. If I put them together in the gallery, some of them have cropped widths others have cropped heights. Impossible to losslessly fit all into the same gallery. If I scale alle figures to the same width, the result is acceptable for the figure with the highest heigth, all other figures are cropped again.
    Well in a first time, I was not that much concerned, but the iBooks Author Quality check refused to publish such eBooks, where some picutes appear cropped in the small view (not in the full-screen view).
    Now, why is the iBA software automatically sizing all images of a gallery w.r.t. the center of an image? It would be of much more help, to leave some white background boarders on images of un-equal height, as long as the width of all images is exactly the same. The crop-pan function would then be useful to individually place a smaller-than-the-rest image in that frame of its larger precedecor image.
    Can this autosize function be turned off? Am I really forced to paste smaller images into a white image of the maximum height/width of the galery's largest image?

    If you have differently shaped (height/width) images that you want to place in one gallery....
    The first image you place will determine the shape (max height and width) of your gallery mask, so choose it wisely.
    Before you add each image to the gallery go to photoshop and:
    1. Size the IMAGE to be at the max height OR width of your gallery mask -- do this if you want at least one dimension (height or width) to fit all the way across or up and down in the gallery mask.
    2. Size the CANVAS to the same height and width of your first image (the size of your gallery mask).
    I hope this makes sense and is helpful. Yes, it's ridiculous, but it's the only way I found to make images of different dimensions fit in a gallery.

  • Can i import "all images" into iphoto to create a new library?

    somehow about 4000 photos out of 10000 disappeared when I moved to the newest iphoto and attached my external hard drive with the old iphoto library to it and switched between libraries using alt to open it.  i was unable to get iphoto to see the missing 4000 even though they were in all images.
    i went to all images on the new mac and dragged it into iphoto and created a new library.
    it seemed to work but then a few hours later when i looked at my photos they are all just faces!!!!!!!! and in all images the photos are all just faces too.
    what on earth is this?

      i am trying to understand why so many of my photos in the library seem to be just faces
    Because you imported the face thumbnails into iPhoto as noted several times
    As My first post explained
    All images is just that - a list of all images on your computer - all photos (two or three versions of each in iPhoto), the faces thumbnails, and probably icons and other images that have nothing to do with iPhoto
    No bug - simply user error
    Yes you can create a new library from the photos in the masters folder
    But first try to rebuild the database again - if that does not work this time download iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  and use it's rebuild command and see how it does - that will create a totally new liberary leaving your existing one untouched so you can go back to it if needed
    LN

  • Why is image over flowing content div into footer div?

    My content div is set at 975px wide padding 20px.  I insert a image that is 700x525.  Content div expands to fit image.  As soon as I set the alignment on the image to left Content div shrinks, image overflowing into footer and text in footer is wrapped around image.  If I set a height for the Content div larger than height of image all is well.  My problem is images on different pages will all be different sizes.
    Code:
    <div id="content">
        <h1><img src="Oral/OralCavity_Labeled.jpg" alt="Oral Cavity" width="700" height="525" align="left" />Content for  id "content" Goes Here</h1>
      </div>
      <div id="footer">
        <h5>Property of College of the Canyons Biology Department. All rights reserved. <a href="mailto:[email protected]">Contact Us</a>.</h5>
      </div>
      <h5> </h5>
    </div>
    </body>
    Please help, can't proceed with website until this problem is solved.

    Try this:
    #content {
    width: 975px;
    background: #FFF;
    padding: 20px;
    overflow:hidden;
    The magic of overflow hidden:
    http://colinaarts.com/articles/the-magic-of-overflow-hidden/
    PS.  I'm glad I'm not squeamish.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Split an image into average small blocks

    Hi Guys:
    Is there any easy way for me to Split an image into average small blocks ? like following , i don't want to get the size of the entire image , and computer the x,y,hight,wight for every blocks , then use image extract

    Hi Abodefree,
    How many averaged blocks do you need? What size of block (in pixels) are you looking for?
    In genersal terms, what is your application -- why do you require the averaged blocks? Are you looking for the brightest quadrant (for example)? 
    Depending on your application, a convolution filter might be useful...
    -- Dave
    www.movimed.com - Custom Imaging Solutions

  • I have 20,00 images in my iphoto they have all been merged into one event. How do I restore them to the original events and dates? them

    I have 20,00 images in my iphoto they have all been merged into one event. How do I restore them to the original events and dates?

    Load the backup from before this happened
    LN

  • I had all photos on a Windows desktop.  Got a mac laptop, installed LR5, and put all images from Windows onto an external hard drive.  When I go to import them into LR on the Mac, they are all locked.  Help, please.  Thanks

    I had all photos on a Windows desktop.  Got a mac laptop, installed LR5, and put all images from Windows onto an external hard drive.  When I go to import them into LR on the mac, they are all locked.  Help, please!

    "I plugged the external into the Mac and moved a folder of images onto the desktop.  It looks like it went from read only to not locked.  Is this possible?"
    Yes, that's exactly what happened. If you buy another drive, you could copy from your existing drive to the new and your files will be read/write. The new drive will have to be formatted as an HFS drive (that's the Mac's format). If you need to format it, you use Disk Utility which is in the Utilities folder on your Mac. Be careful with that -- it wipes out whatever is currently on the drive. Make sure you format the right drive.
    I keep all my images on an external drive, too. In fact, I have two matching drives and sync them so I always have a backup.

  • Why do image links in my HTML signature get turned into inline images?

    I have written a program to create HTML signature files for email programs at my workplace.
    The signature file uses URLs to images hosted on a server. This appears to work fine, but I've noticed that when I send an email from Icedove (Thunderbird rebadged for Debian), the image links automatically get turned into attachments. These are then visible as base64-encoded MIME blocks in the email source.
    I cannot find any option for altering this behaviour anywhere in the application, even in the Config Editor.
    Can anybody advise me how to change this behaviour? Thanks in advance.
    I am running Icedove v.17 for Debian 64 bit.

    By default Thunderbird attaches all images, even if the &lt;img&gt; element points to a remote resource. Most e-mail clients block remote content these days unless the user authorizes it (see [https://support.mozilla.org/en-US/questions/991448 this thread] for an in-depth discussion) due to potential privacy/tracking issues. Thus, the image your are adding as a remote resource may not display the first time the recipient opens the message.
    If you want to change your code respectively anyway, have a look at [http://kb.mozillazine.org/Creating_complex_mails_with_inline_images#Remote_images this article]. You'll have to add an attribute &lt;img '''moz-do-not-send="true"'''&gt; to the element which will Tell Thunderbird to ''not'' download the image from the server and embedding it into the message on sending.

Maybe you are looking for

  • Installation problem with lightroom 3.4

    After a 5th chat attempt , the last one lasting 2 hrs in addition to giving user permission i am no further ahead. I am installing lightroom 3.4 on a win 7 64 bit dell computer. Installation goes well until i click the iconto launch the application.

  • Mstsc.exe crashes after connecting to server 2008

    Hi at all We got a Problem with a Windows 8.1 Client, if we connect to a windows server 2008, mstsc.exe crashes: Name der fehlerhaften Anwendung: mstsc.exe, Version: 6.3.9600.16384, Zeitstempel: 0x5215e2b5 Name des fehlerhaften Moduls: DUI70.dll, Ver

  • Artwork ok in iTunes but 50% of it not syncing

    99% of the songs in my iTunes library have artwork, largely from google. Until recently, all of my songs synced to my 4th gen Nano complete with their artwork. However, now only about half of the songs have their artwork when viewed on the iPod. The

  • Where is the new interface/UI layout for Linux in FF 4?

    I love the new Firefox 4 layout on my Windows PC in my office, with the new toolbar button and cleaned up interface in general. I get home to my Linux PC and see that the UI is still the old ugly (by comparison) style. Added tab pinning is there, but

  • Browser Issues with Lion

    I have just installed Lion and since then when I browse the internet about 10 times a minute Safari tells me it cant open the web page because the computer is not connected to the Internet.  When clicking on the refresh button it loads the page.  Thi