Make Canter in BorderLayout square no matter what.

I have a Frame with BorderLayout. In borderLayout.North is a Panel (flowlayout) with buttons on it. In borderLayout.Center I add a custom Panel. I want the panel in the Center to be square(i.e 300*300), and only square.
(because the custom painting will very heavy mathematical, and I can't change the painting code my friend made for me.)
I have a solution that works, but I think it is "bad" coding. (I read that setPreferredSize shouldnt be used).
//in Frame
addComponentListener(new ComponentAdapter() {
      public void componentResized(ComponentEvent e) {
      //calc average between height and width
      int x = calculateFrameSize(e);
      frame.removeComponentListener(this);
      gui.setPreferredSize(x);
      pack();
      show();
      frame.addComponentListener(this);
}Any input would be most welcome

You could try an smc reset - http://support.apple.com/kb/HT3964
And you could buy a UPS that would power a mini for 45-90 minutes easily - anything in hte 1300-1500VA range should handle running a mini (nothing else plugged into it) for at least a full hour or more.  You'll need to feed the UPS 110VAC when the truck is running though, to recharge the battery between drains.
I have an APC 1300VA UPS that can power my 46" LED-LCD television and cable box for about 35-40 minutes, so I'd be surprised if it could not power a mini by itself for at least an hour.

Similar Messages

  • I cant download pc suite no matter what i try!

    I have just bought the dku-2 cable and the cd software, but no matter what version of pc suite (whether its the older version or new) it wont fully download onto my pc!!! It gets right up to the last bit too....very frustrating!
    What can I do?!

    Ive got XP. and ive uninstalled norton, and no firewalls are up so i dont know wy its still doing it. there should be loads of memory too, ive uninstalled loads of stuff recently. It gets right up to the point of putting the shortcut on my desktop, and it the suite main page starts running, but then the error message comes up and uninstalls it all.

  • I cannot make my firefox browser open no matter what

    im not sure whats going go but every time i try to open my firefox browser it doesnt open i dont know what plugins i need to install so please guide me..

    Did you try a new profile?
    Create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • My ipad wont backup. No matter what I try, it simply wont backup. Keeps rebooting.

    I already deleted the mobilesync folder, deleted some of my apps to make free space (11gb of free space now), restarted the ipad, my macbook, and attempted many of the so called "solutions" and still got nothing. My device is not jailbroken, is running 4.2.1 and my itunes is 10.2.2. Cant seem to backup no matter what.
    Any (other) ideas how to fix this?
    Thank you

    Then I assume that you read the link that Carolyn posted and tried to log in on the Mac with a different user account and that didn't work. I've Googled this over and over for some time tonight and I'm sure you have as well and can come up with nothing else.
    Did you try Settings>Reset>Reset All Settings? Not sure that would help at all but that sticks out from my reading tonight somewhere. If you do that - reboot your iPad before you try to backup again.
    I wish I had another idea for you but I am down to thinking try Express Lane Support. I would hesitate to restore because you have no backup to restore from and you would have to go back to factory settings. Express Lane couldn't hurt but I'm not sure they would help either. If you've had the iPad for less than 90 days you can get free phone support from Apple. If you are close to an Apple Store an appointment at the Genius Bar might be a good idea as well.
    Quick Edit - the other poster solved his issue by reading that link in the thread that I gave you. I know you said you read the thread but did you go to the link, read the article and try those steps?
    Message was edited by: Demo

  • No matter what I do I always get a 404Error for two of my pages

    No matter What I do I cannot link to two pages of mine every
    time I try I get a 404 error.. The url is the exact url I even use
    the thing and drag it over to the file and look at it to make
    sure... No matter what page I try to link to one of these two pages
    it still doesnt work.
    I have tried making the two pages all over again and that
    didnt help.. I tried everything I know how to do..
    Here is my site www.furnaps.com
    there is a box at the top that says Freebie site reviews and
    there are two links one says Rewards1 and the other Prizerebel..
    the urls are rite but if you click on them you get a 404 error..
    same goes if you use the navigation and go to the page that says
    site reviews and then you will see links to these two pages again
    but those one dont work either....
    Why am I getting these 404 errors when the urls are rite??
    Thanks

    No One?? I could really use some help here Im stumped....
    I have tried deleting the pages and making new ones and them
    making new links to those pages but I still get a 404 error for one
    of the pages....
    I did everything I could think of I mean everything.. I cant
    even get to the page if I type the url in the browser it still says
    404 error...
    I know the page is there I uploaded it and it shows up on my
    ftp program and in dreamweaver...
    Can someone please give me some ideas here?? Its really
    holding me back from finishing my site..
    Here is a link to a screen shot of my FTP program showing
    that the page is on the server. The one I cant get to work is the
    rewards1.html and sometimes the prizerebel.html does it also
    http://img245.imageshack.us/img245/3331/404errorkc6.jpg

  • Hi, I have moved to India from france and I am trying to update my payment options to the Indian visa card but it seems that no matter what I do I cant do it. I dont want to create a new ID..Plz Help!!!Just want to change my location and my payment detail

    Hi, I have moved to India from france and I am trying to update my payment options to the Indian visa card but it seems that no matter what I do I cant do it. I dont want to create a new ID..Plz Help!!!Just want to change my location and my payment details!! thanks in advance!!

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    Note if you have iOS devices and haven't moved your contacts and calendar items across then you should create one dummy entry of each in your new profile and iTunes should  merge the existing data from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library or a backup then then seeRecover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
    tt2

  • No matter what I do I cant delete itunes from my computer so I can install newest software.

    no matter what I do I cant delete itunes from my computer so I can install the newest software?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    Note if you have iOS devices and haven't moved your contacts and calendar items across then you should create one dummy entry of each in your new profile and iTunes should  merge the existing data from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library or a backup then then seeRecover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data.
    tt2

  • I forgot my icloud password and my email for icould is no longer effective. i cant make any change to my iphone now, what should i do?

    i forgot my icloud password and my email address for icould is no longer effective. i cant make any change to my iphone now, what should i do?

    Contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password.

  • No matter what i do i cant extend my network??

    Okay so i brought an Apple Express basestation brandnew from Apple about 4 months ago that I am using as my basestation. I have been able to acess my internet etc all without an issue via various devices in the house such as my 10.6.8 iMac, 10.5.? Mac Mini, and my iPad, as well as other devices like the PS3, my Acer phone and an Asus Vista desktop (the latter with a wireless card)
    I brought another express second hand but only about a year old to extend the range of the network and no matter what setting I use it will not extend the range. I have ensured that the express I am using as the main gateway have the extend this network box checked. I have also tried setting up the secondary express to "join my existing network" (which does everything you would expect this setting to do) and also "extend my current network" which is where issues arise such as it slipping in and out of visibility on the Airport Utility.
    I even tried setting it up using the WDS system and that yeilded no results at all, this was the only time that none of the computers/devices would connect.
    The only reasons that I can think of that would make it not work are these questions:
    Does the gateway to the modem have to be an airport extreme/time capsule, or is the express fine for this?
    Does the secondary express have to have to be hardwired to the gateway express? Which obvioulsy isnt going to happen
    Do you have any other ideas? Would swapping the two expresses around so the one that i want to be the secondary is actually the primary gateway and viseversa or is that a wasted exercise? I am familiar with all of those posters that comment here a lot and thank you for your tips. Have tried all of the stuff you have mentioned time and time again! I spent about 3 hours trying and retrying various configurations last night and again this morning after switching off every device in the household over night.
    the original express runs seamlessly, and if i bring the devices closer to the original they work perfectly. the secondary one is just like a washed out bridge, its there and does part of what you need, but not completely usefull without all of it!
    Thanks!

    Ok, here's another set of step-by-step instructions for configuring an extended network. Please give them a try to be sure you didn't miss anything.
    Dynamic WDS - Extending a Wireless Network Setup
    If practical, place the base stations in near proximity to each other during the setup phase. Once done, move them to their desired locations.
    Open AirPort Utility, and then, select the base station that will connect to the Internet.
    Choose Manual Setup from the Base Station menu, or double-click the base station to open the configuration in a separate window. Enter the base station password if necessary.
    Click AirPort in the toolbar, and then, click Wireless.
    Choose “Create a wireless network” from the Wireless Mode pop-up menu, and then, select the “Allow this network to be extended” checkbox.
    Next, select the base station that will extend this network, and then, choose Manual Setup from the Base Station menu, or double-click the base station to open its configuration in a separate window. Enter the base station password if necessary.
    Choose “Extend a wireless network” from the Wireless Mode pop-up menu, and then, choose the network you want to extend from the Network Name pop-up menu.
    Enter the base station network and base station password if necessary.
    Click Update to update the base station with new network settings.

  • I have a document in Pages that, when I export it to Word, makes all the pages bold font no matter what I have tried.

    I have a document in Pages that, when I export it to Word, makes all the pages bold font no matter what I have tried. What am I missing?

    You might have luck in the Pages community. I’ll ask the hosts to move your post there.
    Pages Community

  • Im trying to transfer my cs4 from my old pc to my new pc without a media disc. I cant find my licensing volume #. What steps do i need to take to make it happen?

    Im trying to transfer my cs4 from my old pc to my new pc without a media disc. I cant find my licensing volume #. What steps do i need to take to make it happen?

    Contact Customer Care

  • No matter what i do, i cant download Illustrator

    no matter what i do, i cant download Illustrator

    Lesley,
    I believe this may be one for Customer Care (tick I Still Need Help and hope for an agent available for a chat),
    http://helpx.adobe.com/contact.html?product=illustrator&topic=downloading-installing-and-s etting-up
    or for this specialized forum (where you may be able find the answer from previous threads),
    http://forums.adobe.com/community/download_install_setup
    or for Adobe Support (phone),
    http://helpx.adobe.com/adobe-connect/adobe-connect-phone-numbers.html

  • Junked old macbook for a new one. changed apple id password from a different mac. i want to login and it asks for name and password. no matter what i type i cant seem to login. any way help?

    junked old macbook for a new one. changed apple id password from a different mac. i want to login and it asks for name and password. no matter what i type i cant seem to login. why cant i just enter my apple id and password. or is there a way to change whatever name and password are on the new one from another mac so i can login. anything helps...thanks

    Just open System Preferences>Users & Groups and unlock the preference pane with your root password.
    Set the New Account to be an Administrator and fill in the rest of the data and then click "Create User".
    I would suggest using this user to be YOU with admin capabilities. I wouldn't use the root user - too much damage could occur if you're not sure what you're doing. If you have files, etc., that you want to move to this account, simply but them in the Shared folder - or if you 'rescued' some old files and the like from your 'trashed' MBP, you can put them in your NEW admin account folders.
    Hope I've explained myself well - call back with any questions!
    Clinton

  • I just took in my macbook to the apple store to clean the fan because it was starting make a little noise but instead of making it stop it sounds like an airplane about to take off all the time, it doesn't matter what i'm doing. I dont know what to do now

    I just took in my macbook to the apple store to clean the fan because it was starting make a little noise but instead of making it stop it sounds like an airplane about to take off all the time, it doesn't matter what i'm doing. I dont know what to do now? any ideas on how to make it stop?

    take it back asap.  If it wasn't doing it before they cleaned the fans, they may have accidentally done something that is causing this behavior.

  • I recently received a samsung galaxy tab 4 nook? and no matter what i cant sign in adobe keeps saying my iinfo is wrong yet i can sign on here whats the issuee and how can i fix it

    I've tried resetting the password that doesn't work no matter what I try

    I wish I had an answer, but the same thing is happening to me.  Can I go back to the old version of Digital Editions, please?  Any help is greatly appreciated.
    Update:  While I didn't answer the question above, I did manage to fix my problem.  Here is the background:  My old Nook was a Nook Color, which, while it was greatly loved and semi-intelligent, it wasn't a tablet.  When I connected it to my computer, it was recognized as a device and showed up in Digital Editions.  My library uses Overdrive to handle the borrowing and download/reading functions.  When you borrow a book, you downloaded it to your computer, opened it in Digital Editions, and then did a "drag and drop" into your Nook.  I had assumed that when I got my new Samsung Galaxy Tab Nook, it would work the same way.  I had not adjusted my thinking to realize that the Tab is a true computer with an operating system (Android) such as that on my laptop.  I was trying to fix the problem with the DRM authorization using every other ePub reader that I could find (installing the app and then attempting to open the book) and nothing worked.  I finally got a message that clicked saying "You do not have rights to open this book" rather than the unhelpful message that I got from Digital Editions saying "Error! Check Authorization".  I looked at my library's website and caught the notification that Overdrive has an app.  I downloaded and installed it, connected to my library, logged in using my library card number and everything was there.  Now, instead of downloading to my laptop and then moving the book to my Nook, I directly connect to my library's website and download the book to my Galaxy Tab.  I could read directly in my browser (provided I was connected to the internet) but downloading ensures that I can read the book in any situation.
    This absolutely does not fix the problem in the question above, nor does it answer why my old method worked for exactly two and a half books and then stopped working, but at least I learned something and I have a solution that means my Galaxy Tab can be used for the primary function of my old Nook, that of packing library books with me no matter where I am in a lightweight, easily read format.

Maybe you are looking for