JButton wont resize - Question not Problem

Hi,
I'm wondering if you can give me the reason behind this behaviour.
If you add a button to a panel, then call setSize(), the button doesn't resize itself on the panel. I've tried setting the setPreferredSize method as well, but the button always stays as the size it was created.
I know there are work arounds, but how come you cant just set the size of a button on an empty panel?
Cheers
Dave

setSize(...) won't work, because the LayoutManager will override whatever you set. (Although setSize(...) is require when using a null LayoutManager).
setPreferredSize(...) should work. If it doesn't then you have something wrong with your program.

Similar Messages

  • Sleep usage question - not problem

    Sleep seems to work differntly on my new iMac compared to my old G4 FP iMac.
    Question - are these observations below normal?
    1. When I used to put my G4 to sleep (by clicking apple/sleep), my G4 would seem to more completely sleep. Even my external Lacie firewire drive wuold turn off its light and shut down. But with my intel iMac, the light on the external drive does not turn off.
    2. It seems like the iMac fan is still running after putting it to sleep. When I check the next morning the iMac still seems warm/hot with the fan still running(though amost silently).
    3. Also I notice that my G4 would provide the stobing light only when the computer was put to sleep, if the monitor alone was sleeping the strobing light would not flash, but with the intel iMac the strobing light will flash if the monitor has timed to sleep, but the computer has not.
    4. I'd also note that I have the preference set to allow hard drive to sleep. And I do find that I can hear the hard drive starting up again (especially the firewire drive) after not using the drive for a while. Nevertheless, the firewire drive light is on all the time.
    Thanks for any comments,
    Tony

    554/3000
    Hi Tony,
    Yes, it seems the light (steady or pulsing) "tasks" have changed since the G4 iMacs.
    See here:
    - http://docs.info.apple.com/article.html?artnum=58016
    So it may very well be different again with the new Core Duo iMacs?
    Of course your computer is awake and works, if it's only the display sleeping.
    Axl

  • Hello, can someone help me: my eMac G4 700 MHz. I can not boot it. If he starts appears on the screen, only a small "folder with a question mark." The Mac was not used 1 year. Question 1: Problem = hard drive? Question 2: Problem = PRAM battery? the What

    Hello, can someone help me: my eMac G4 700 MHz. I can not boot it. If he starts appears on the screen, only a small "folder with a question mark." The Mac was not used 1 year.
    Question 1: Problem = hard drive?
    Question 2: Problem = PRAM battery?
    the
    What can I do to boot?

    Restart with the Option key held down.
    If the internal drive shows up, it's the PRAM battery.
    If it doesn't, insert a compatible Mac OS 9 or X install disk, click the button with the circular arrow, and either repair the internal drive or install a new OS on it. If it doesn't show up in Disk First Aid(9) or the Disk Utility(X), it's either not plugged in or needs to be replaced.
    (97530)

  • Questions Not Answered. Problems Not Solved.

    Hi,
    I have downloaded and installed Mac OS X Lion.
    During the Installation and usage of the Lion, I have encountered  some problems.
    "I posted these questions and problems on Apple Support, but MOSTLY not answered".
    So, "please, apple tech people'', solve the problems for us...
    I'd be greatly apjpreciated if you could check out my posts(through my Apple ID "EDLIU") and answer my questions.
    Thanks in advance.
    Ed

    To echo what Michael has just said we're all just people like yourself trying to help each other out.
    I normally display 30 entries per page and if I want to go back to yesterday I have to page back to round about page 30 - that means that many questions are disappearing from the front page. Luckily us helpers seem to span the globe so there's nearly always somebody here trying to help. His day in Australia is my night in the UK
    Regards,
    Colin R.

  • I just reset my computer and my itunes account is not allowing me to do anything unless i answer my security questions. the problem is i never supplied them with the answers they are asking.i don't know what to do!!!

    i just reset my computer and my itunes account is not allowing me to do anything unless i answer my security questions. the problem is i never supplied them with the answers they are asking.i don't know what to do!!!

    https://expresslane.apple.com/Issues.action

  • LR 5.3 export with resize option not resizing

    Hello!
    Just updated my LR to 5.3 from the CC and noticed a weird problem that I never encountered before in LR4 or 5.x (before 5.3 that is).
    I usually export pictures from RAW format to either TIFF or JPG (100% quality) and depending on purpose I use batch resizing, e.g. 1080 pixels on short edge ... well that whole Resize setting gets ignored by LR 5.3! It still exports full size (full RAW size in this case) into JPG or TIFF, but it won't resize ... is it a bug or I am doing something wrong here?
    EDIT:
    I found out that I checked the "Don't enlarge" box in Export dialog under Resizing, that's when resizing was not working. After I unchecked it then it works fine, but still what does that have to do with anything if we are talking about downsampling images from 5184x3456 pixels to 1620x1080 ...

    It's a (reported) bug. Exportant provides a fix for it.

  • Error Message "The Remote device or resourse wont accept connection, not set up to accept connection from port https"

    I get this error message when trying to open and log into an online casino "The Remote device or resource wont accept connection, not set up to accept connection from port https".
    I am on a desktop computer my connection to the net is with a USB Virgin Mobile hotspot device.
    I also have issues with some downloads not installing right for instance SKYPE wont work. If the problems are related I don't know
    Thanks

    Starting in Firefox 14, Firefox will guess an address and place it in the address bar (AutoFill feature). If you have ever connected to the site using a secure (HTTPS) connection, then Firefox will try to connect security to the address suggested by the AutoFill feature. To work around this you can:
    * Edit the address to force Firefox to interpret your entry literally. For example, if there is a trailing / you can remove it.
    * Turn off the URL bar AutoFill feature and just use the AutoSuggest drop-down.
    * Clear Firefox's memory of the site so it doesn't default to a secure connection (however, this also removes any bookmarks you have to pages on the site).
    To disable the in-address-bar autofill without losing the suggestions that appear below the bar:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the filter box, type or paste '''autofill''' and pause while the list is filtered
    (3) Double-click '''browser.urlbar.autoFill''' to toggle it from true to false. You're done with about:config and you can close this tab.
    "Forget about this site" will clear cache, history, bookmarks, and permissions for the site, and probably any saved certificate. There are two ways to get to this:
    * History > Show All History, right-click an entry for the site > "Forget about this site"
    * Type or paste about:permissions in the address bar and press Enter, then select the site from the list on the left side, and click the "Forget about this site" button on the right side
    Depending on the size of your history and cache, this may lock Firefox up for a minute or two while everything is cleansed.

  • My ipod touch 4th generation's home button and lockscreen work perfectly but the screen is unresponsive and wont work whats the problem?

    My ipod touch 4th generation's home button and lockscreen work perfectly but the screen is unresponsive and wont work whats the problem?

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • My iphone died today and now it wont boot up not even a apple sign is sowin any help???

    i updated my iphone 3gs yesterday via itunes, now today the battery seemed to drain very fast and my phone died, iv had it on charge and noe it wont turn on not even an apple sign shows.... im at a loser here and really need help.... i have tried to reset the iphone and also tried to put it in recovery mode and nothing is working....... please help!!! cheers ash

    Thats the flat battery screen.
    - Try another cable
    - Try another wall adaptor
    - Check the iPhone charging port to see if there is any damage or debris
    If the iPhone does not charge with known working cables/adaptors I would suggest to take the iPhone into an Apple Store or Apple Authorised Service Provider for evaluation and if need be service.

  • Itunes wont install ,could not access network location %appdata% error?

    itunes wont install ,could not access network location %appdata% error?

    Let's try the following user tip with that one:
    "Could not access network location %APPDATA%" install errors

  • My ipad 4 is frozen not charged wont stay on and has a dark grey keyboard that wont go away not charging

    my ipad 4 is frozen not charged wont stay on and has a dark grey keyboard that wont go away not charging

    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings

  • A way to find my previous questions and problem reports?

    Is there a way on this forum to find my previous questions and problem reports? Since posting a question earlier today, I've found MOST of the answer and would therefore like to append what I found to the question, without waiting for someone else to answer it. I don't remember the title I gave the earlier question, or I'd use that title in searching for it.
    The troubleshooting information below is more relevant to a previous problem than this question.

    '''My Contributions''' link on a main forum page should display a listing of all your postings.
    [https://support.mozilla.com/en-US/search?q=&num_voted=0&num_votes=&asked_by=milesrf&answered_by=&q_tags=&created=0&created_date=&updated=0&updated_date=&sortby=0&a=1&w=2 See this forum search for your Username under "Asked by"]

  • HT5620 hi , why the rest security question not shown in my browser to press on it and rest my forgotten answers ?? hellllp plzzzz

    hi , why the rest security question not shown in my browser to press on it and rest my forgotten answers ?? hellllp plzzzz

    Alternatives for Help Resetting Security Questions and/or Rescue Mail
         1. If you have a valid rescue email address, then use this procedure:
             Rescue email address and how to reset Apple ID security questions.
         2. Fill out and submit this form. Select the topic, Account Security. You must
             have a Rescue Email to use this option.
         3. This is the only option if you do not already have a valid Rescue Email.
             These are telephone numbers for contacting Apple Support in your country.
             Apple ID- Contacting Apple for help with Apple ID account security. Select
             the appropriate country and call. Ask to speak to the Account Security Team.
         4. Account security issues almost always require you to speak directly to an
             Apple representative to securely establish your identity as the account holder.
             You can set it up so that Apple calls you, either immediately or at a time
             convenient to you.
                1. Go to www.apple.com/support.
                2. Choose Contact Support and click Contact Us.
                3. Choose Other Apple ID Topics and choose the appropriate topic for
                    your issue.
                4. Follow the onscreen instructions.
             Note: If you have already forgotten your security questions, then you cannot
             set up a rescue email address in order to reset them. You must set up
             the rescue email address beforehand.
    Your Apple ID: Manage My Apple ID.
                            Apple ID- All about Apple ID security questions.

  • HT1349 No sound while playing music or in other programme but there is not problem to call

    No sound while playing music or in other programme but there is not problem to call

    Hello Koyirai
    If you are having issues with sound, check out the article below to troubleshoot the issue further with checking connections with any Bluetooth devices and checking the headset jack to ensure nothing is blocking access.
    iPhone: No sound or distorted sound from speaker
    http://support.apple.com/kb/ts5180
    Regards,
    -Norm G.

  • Anyone come across error 11 while trying to synch or update an IPhone 3GS that previously had not problems synching?  Have reinstalled ITunes but to no avail...?

    anyone come across error 11 while trying to synch or update an IPhone 3GS that previously had not problems synching?  Have reinstalled ITunes but to no avail...?

    Seems that way. I think I am going to have to give in and spend hours on the phone with Apple support. I don't want to, but I am at a loss. I will share any discoveries...

Maybe you are looking for