Buttons doesn�t fit the panel correctly

public class myProgram extends Applet implements ActionListener
JButton blue = new JButton();
     JButton red = new JButton();
     JButton yellow = new JButton();
     JButton green = new JButton();
     JButton white = new JButton();
JPanel painel = new JPanel(new BorderLayout());     
painel.add(blue,BorderLayout.NORTH);
     painel.add(yellow,BorderLayout.CENTER);
     painel.add(red,BorderLayout.EAST);
     painel.add(green,BorderLayout.SOUTH);
     painel.add(white,BorderLayout.WEST);
add(painel); //add panel to the applet
When I add the buttons they don�t fit correctly the panel. I have tried many kinds of layout and I didn�t get what I wanted. Some buttons seems bigger than the others.

When I add the buttons they don�t fit correctly the
panel. I have tried many kinds of layout and I didn�t
get what I wanted. Some buttons seems bigger than the
others.Well that happens with the BorderLayout. Possible solution might be using a GridLayout, a FlowLayout and the setPreferredSize(), setMaximumSize(), setMInimumSize() methods, a null layout and the set****Size() methods plus the setAlignmentX() setAlignmentY() methods.
al912912

Similar Messages

  • Workspace doesn't fit the screen anymore...

    Hello.
    Since today (and Mac OS X's update I installed this morning, I guess), my Photoshop CS6 workspace doesn't fit the screen of my 12 inch Cintiq (connected to a 2014 Macbook Air).  No matter what I do, it keeps it wrong.
    Trying to set the photoshop window to the whole Cintiq screen with the "green" Mac OS corner button, this is what I get:
    Hitting F won't do the trick, this is what it gets me:
    I tried to clear the Photoshop prefs, without success.  I checked for updates and found there was a Photoshop update I had not yet installed, and I did install it, to no success.  Needless to say, this makes my copy of Photoshop most unusable, which is a really big problem for an illustrator like me.  I really wish I can solve this as soon as possible.
    Thanks.

    Yeah, no results. Still the same.
    If I take my main window and move it up by myself, it's just gonna stay there until the next click somewhere, then it gets back to this wrong placement,.

  • Booklet .pdf with crop marks, booklet doesn't fit the current paper size warning

    Hello. I am on XP using CS4 InDesign.
    I have the document set up as 4 pages, each 8.5 x 11, however, when creating a booklet .pdf, I mean it to be 2 pages 11x17.
    When I add in the crop marks they do not appear on the .pdf when it is created. I receive a warning in the booklet diaglog that the booklet doesn't fit the current paper size and it says to specify a larger paper size.
    What can I do to have the crop marks on my file? I understand the .pdf will be a little larger than 11x17 in order to fit the crop marks.
    Thanks for any help in advance.

    Hi Peter,
    Thank you. I did try that first, but now I figured out what I did wrong. When the .pdf was made and opened, I cropoped the page according to the marks, but the page remained 12 x 18 instead of 11x17. I made sure that the "automatically adjust to fit marks and bleeds" and "use document bleed settings" was checked in the booklet dialog and print InDesign dialog.
    When I cropped the page again to make sure I sized it correctly, it was 11x17.
    Thank you!!!

  • I send my iPhone to apple because my standby button doesn´t fit, what exactly should i send to apple? earphones and charging cable too?

    I send my iPhone to apple because my standby button doesn´t fit, what exactly should i send to apple? earphones and charging cable too?

    No! All Apple needs is your actual phone. Do not send the box or anything else as they will throw it away and you won't get anything back except for a phone! Do not send the sim card either and make sure you backed it up!

  • Battery failure although my battery doesn't fit the exchange program?

    hello there!
    i know there have been a lot of threads about the battery life and failures in the macbook pro but i don't know which one fits my case...
    my mbp is a week 13 and has no problems at all. i don't use the battery that often - by now i have 14 cycles.
    my battery's serial number doesn't fit the exchange program but today happened this odd thing:
    i used my mbp on battery for less than two hours and the battery symbol said that i still have about 50 minutes of battery power. all of a sudden it turned off (as described in many other threads) without any warning and i couldn't turn it on without plugging in the power cable. when i turned it on it started from deep sleep mode (dimmed desktop).
    ...of course i did reset the pram and stuff - but what is going on? as i said i don't meet the exchange program for faulty batteries but still it doesn't seem to work proper.
    what can i do?
    thanks in advance, guys!
    j.

    hi and thank you all for your replies so far!
    over the weekend i took some screenshots showing the various total of mAh. i have no idea if that is normal like this? and the battery is behaving normal again, no random shutdown... you can find the images under the following link...
    http://www.propaganda-pixel.de/mbp/mbp.htm
    in addition i added a photo of my magsafe... now that it comes to the battery issue i got slightly concerned if this crimpy cord should be like this (not that this thing starts to melt on me!).
    when i transport my mbp i wind the cord around those two hooks and i never pull the magsyfe by the cord out. but still it looks like this.
    the power cord is from a week 10 macbook pro which i got exchanged for a week 13 but i had to keep the cord...
    i know, this has nothing to do with the battery issue and no, i'm not paranoid - just now that i started this thread i thought i could add it...
    so my questions are:
    - shall i request a new battery considering the various mAh indications?
    - shall i request a new power cord? or does mine look normal?
    why i ask is because i don't want to request something when there is no need for a replacement.
    thank you all!

  • My iPod touch 4th gen white's home button doesn't work the first time I press it, but the second time.

    My home button doesn't work the first time I press it, but the second time.  This is very annoying.  Why is it doing this?

    - Try a reset. It cures many ills and nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    -If a hardware problem see:
    fix for Home button

  • A5 booklet  "doesn't fit the current [A4] paper size". What's wrong?

    Hi,
    Sorry, I'm new to InDesign, and am having a bit of a freakout over a booklet I need to complete by this afternoon.
    The page sizes are all A5. I try to print with A4 paper settings and the preview looks okay, but says underneath "the booklet doesn't fit the current paper size". Obviously A5, A4, it should fit perfectly, as  it looks to in the preview. When I actually print it the pages are slightly jumbled - 3 with 24  (of 24 pages), 4 with 23 etc., with the centrefold 12-13 split (12-15, 13-14).
    Any idea what's going on here? Is it something to do with crop areas? I can't work it out.
    Thank you! An enormous amount of gratitude to anyone who can help me fix this.

    OH HEY  it's suddenly saying it's fine now, even though the  only thing I've changed is to add a  bit  of  text, nothing that should fundamentally affect the structure. Thanks InDesign!

  • Long text doesn't fit the window exactly

    Hi friends,
    in PO smartforms i have included the header text of PO.
    the problem is the long text doesn't fit to the window exactly i.e.,
    when we enter the text in PO in the header a line can contain only 60 characters approximately where as in my smartforms it can contain more than that.
    so in the display of smart form i get lot of space in the right side and i get the remaining part of text in the next line.
    regards,
    Saravan raj

    hi,
    what u have told is correct but we can't expect the end user to do it each time when they paste the long text.
    is there any option to bring it by default.
    regards,
    saravan raj

  • Get Info "Change All" button doesn't keep the proper "Open With" app

    I have a small but annoying problem that appears in Leopard 10.5.2 (been there since original 10.5.0 install) that I have tried to troubleshoot but can't solve.
    The problem is:
    -With some of my file types, the wrong "Open With" application is displayed when I view a Get Info for that file type. So to fix this, I open a Get Info window on one of those types of files, and choose the PROPER default application in the "Open With" slot. This works, and then the new proper application name now shows in that slot. So then I click the "Change All" button and apply to all files of that file type. I receive the warning that I will be changing ALL files of that type. I choose "continue" because that is what I desire.
    However, once I do that, (click Change All, then Continue button), the old, wrong application name jumps back the Open With slot! So the new, correct application choice doesn't "stick".
    Oddly enough, it sort of DOES work, because if I then re-click in the Open With slot, although the old, the wrong application is back listed again, if I look up above that name, then my actual desired application is listed in a list, and it has the word (Default) beside it.
    So if I do actually now double click any file of that type, then the proper application DOES launch and open the file.
    But why does the Get Info window still display the wrong, non-default application in Open With? And furthermore, this causes all file types of that kind, to display the WRONG icon in any Finder window. They of course display, the icon of what is in the Open With slot list.
    I am having this problem only with two file types and apps. (Cubase and Pro Tools---DAW audio apps). All of my Cubase files display a Pro Tools icon, and show as Open With: "Pro Tools" when of course it should display Open With: Cubase. As stated in the Open With list, Cubase is indeed there among other programs and it has the word (Default) beside it. So it sort of works when launching files. But I still cannot get Cubase to "stick" and stay in Open With after Change All!
    Can anyone offer any tips on what might cause this and what fix is needed?
    Thanks so much in advance!
    Wade

    Well, I tried rebuilding the Launch services with the command listed but still no luck. After having no luck with that and deleting caches, etc....I also, went to my home (user) directory and in Preferences, I deleted the com.apple.launchservices.plist file. I restarted and checked and still the same result.
    Also, I want to emphasize again that the file type I am discussing DOES actually launch with the correct application. (Cubase files in my example).
    But it is just annoying that ALL of my Cubase files display the Pro Tools application icon, and in Get Info they are listed to open with Pro Tools. But they actually do launch Cubase if double clicked.
    And one other VITAL note....if I open Get Info for one of these files, and change the Open With from Pro Tools to Cubase....then that choice DOES "stick" and retain. (if I "don't" also click Change All)
    It's only when I click "Change All" that it DOESN'T stick and the list selection jumps back to Pro Tools. I hope that may offer some clarity.
    Thanks for the tips but I am still back at square one.
    Wade

  • My thunderbolt to firewire adapter doesn't fit the firewire???

    I bought the apple store "Thunderbolt to FireWire Adapter" today.  I'm trying to put my old iMac in Target Mode and move old files.  The firewire cord doesn't fit into it???  I'm sitting here feeling pretty stupid and stumped?

    Your firewire cord is the wrong size.  Apple's cord is 800 port.  What size is your cord? 

  • HT204291 When I airplay my ipad, it doesn't fit the tv screen

    I have ipad air and using toshiba tv. When I mirror the image to the tv screen, it doesn't "fit to screen". Are other people having this problem?

    Welcome to the Apple Community.
    Mirroring won't fill the TV screen. The iPad has an aspect ratio of 4:3 and the iPhone 4S or prior an aspect ratio of 3:2, neither of these will fit exactly into a TV screen which as an aspect ratio of 16:9. The Apple TV will not zoom the mirrored image, because it may well cut off information which is situated at the top or bottom of the screen.
    You may wish to try each of the settings in ‘Settings > Audio & Video > Adjust for AirPlay overscan’ for the best setting that suits you.

  • The screen doesn't work except on the bottom and i cant reboot it because my power button doesn't work, The screen doesn't work except on the bottom and i cant reboot it because my power button doesn't work

    I was in the middle of texting my mom and the screen stopped working! It only stopped working in the middle but i can't even turn it back on because my password numbers won't work when i touch them! I also cannot reboot my ipod because the power button doesn't work! I need help on fixing this problem please!!

    Try as best you can with broken button.:
    - iOS: Not responding or does not turn on
    Place the iPod in recovery mode using one of these programs:
    For PC
    RecBoot: Easy Way to Put iPhone into Recovery Mode
    If necessary:
    Download QTMLClient.dll & iTunesMobileDevice.dll for RecBoot
    For MAC or PC
    The Firmware Umbrella - TinyUmbrella
    - 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       

  • Movie doesn't fit the tv screen

    Hi,
    i transfered a video from my camera wide screen to my laptop using iMovieHD6. Then, i shared it to iDVD6 and burnt a dvd using Best Quality encoding. When i play it on my tv, which is wide screen, the image is cut. Anyone can tell me what to do to make it fit the TV Safe Area. I am new to the mac world i need help!
    Thanks
    MacBook Pro Mac OS X (10.4.9)

    DVD: How to Determine TV Safe Area
    http://docs.info.apple.com/article.html?artnum=50151
    iDVD: Creating widescreen DVDs for standard size televisions
    http://docs.info.apple.com/article.html?artnum=303030
    http://discussions.apple.com/thread.jspa?messageID=2551853&#2551853
    Hope this is Helpful & Solves the problem but if not come on back.

  • When printing an email, the "properties" button doesn't open the hp printer's properties

    The "properties" button in the "print email" window does not take me to the Hp C7280 Printer Properties window. I keep pushing the button but it never executes the transfer. All other buttons and options in the print window work.
    == This happened ==
    Every time Firefox opened
    == just started a week or so ago. I haven't made any changes, and previously it was working fine

    The issue is likely caused by one of your add-ons. Restart Firefox with Add-ons Disabled to check if that's the case.
    * [[Troubleshoot Firefox issues using Safe Mode]]
    If the problem goes away in Safe Mode, you can either try to determine which add-on is to blame, or you can Reset Firefox and get rid of them all.
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Reset Firefox – easily fix most problems]]
    As for Firefox's appearance, you can install the Classic Theme Restorer add-on.
    * https://addons.mozilla.org/firefox/addon/classicthemerestorer/
    * [[How to make the new Firefox look like the old Firefox]]

  • Workbook doesn't fit the window when launched from Portal

    Hello SCNer's,
    When a workbook is launched from Portal it opens to the right side of the window and is minimized.
    It fits the window once maximized, are there any settings available which can defaultly set the workbook to fit the window.
    Thanks SCNer's.

    Hi,
    Do you mean by executing the Query in portal or executing the Workbook.
    Protal setting for the number of columns/rows are decided by 0ANALZER_PATTERN web template. Which is the default web template.
    Check the settings in the Default Web Template used.
    Thanks & Regards,
    Namrata

Maybe you are looking for

  • Inline HTML + Inline Text + attachment all 3 in 1 mail  in Outlook

    Hello All, I am trying to compose and send a mail using JavaMail library using which I can send a mail with 1) HTML in the body of the mail and 2) 4 -5 line of text (along with HTML , not as alternative text) and 3) an attachment (which will also be

  • English keyboard on Japanese iBook G4?

    My wife bought her iBook in Japan with the original Japanese-layout keyboard (Japanese characters printed on the keys, etc). After about a year of use, many of the letters were fading on her keys, and she needed a replacement keyboard... We've reloca

  • How do i clean up start up disc space

    I am getting a message saying that my start up disc is full. How do I clean it up?

  • Pictures in folders?

    In Aperture 2, I created a project, now I want to put a folder underneath it (witch i have). Can you put pictures in folder? If so, how do i do it? If not, what's the point of folders? Thanks Why_atl

  • ADS configuration for SAP Netweaver 7.1 SP3

    Hi Everyone here: I have installed J2EE engine of SAP Netweaver 7.1 SP3 with ADS service. <a href="http://help.sap.com/saphelp_nwce10/helpdata/en/37/504b8cbc2848a494facfdc09a359b1/frameset.htm">The standard guide of configuration</a> And after the co