Which is the easy layout in swing that allows component setSize() ?

Hi,
I am new to swing, Can any body suggest me which one is the easiest layout to implement that allows setting height and width of components.
I have found that with layouts, setting component height and width do not work.
Thank you.

Using a LayoutManager and manually setting the size of components is to a large degree mutually exclusive.
It is the LayoutManager that determines the location and the size of the child components.
So, when using LayoutManagers, one only sets the size of the top level container. Its LayoutManager will do the rest, based on supplied constraints and the values that child components return on getPreferredSize, getMaximumSize and getMinimumSize.
You may influence these values by setting them explicitly on the child components.
Piet
Edited by: pietblok on 13-feb-2009 13:12

Similar Messages

  • HT201302 I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks

    I am trying to upload pictures from my phone to my computer and I'm getting an error message that a photo is corrupted so it can't download.  I don't know how to tell which of the photos is corrupted so that I can delete it and try again?  Thanks!

    If this is an iCloud account the Outbox only appears when sending an email, so if it is still trying I suppose it should be showing now (not sure though, hard to replicate this)
    What type of email account?

  • I forgot my Firefox Sync username and password but have the sync code. Will that allow me to recover my bookmarks? I don't have access to the original computer in sync.

    I forgot my Firefox Sync username and password but have the sync code. Will that allow me to recover my bookmarks? I don't have access to the original computer in sync.

    You need at least the email address that you used to create that account to reset the password.
    *https://services.mozilla.com/

  • Which was the last version of Firefox that Supported Java Platform 6 ?

    I want to know the the last version of Firefox that Supported Java Platform 6 update 45 (Java SE Runtime Environment 6u45) ?
    In other words which version of firefox started support for Java 7 ?

    Please also give links to the problem pages if they are public so that we and others may test them. You could also consider contacting the sites concerned directly yourself.
    Using Java can raise security concerns,and especially so using outdated versions.
    * see a couple of Mozilla blogs <br />https://blog.mozilla.org/security/2013/01/11/protecting-users-against-java-vulnerability/ <br />https://blog.mozilla.org/decoder/2012/04/06/why-an-outdated-java-plugin-is-so-serious/
    * and one of their own,noting the long list of links and security fixes.<br />https://blogs.oracle.com/security/entry/july_2013_critical_patch_update

  • I saw Corey Barker do a demo where he extracted an image from the background, then cleaned up the edge with a process that allowed him to de-fringe it.  I can't remember how he did it. And I can't find it.  Help!

    I saw Corey Barker do a demo a few weeks ago where he extracted an image from the background, then used a technique I was not familiar with to clean it up. You selected the area, then did something that involved going either to edit or select, then there was a dialog box that allowed you to dial it in, depending on the color background you were removing.  I can't find this anywhere. Can't remember.  It's driving me crazy!  If someone can help me find this, I would be very glad and grateful. Thanks!  Laura

    In technical support, sometimes you have to make educated guesses. I'm sorry that you were offended.
    iTunes does prompt when it is going to erase a device, and the message is clear.
    She said in her message that she was able to successfully sync the old ipad. This indicated to me that itunes wiping the data was not an issue, because either it had been setup at the apple store (in which case it doesn't actually wipe the ipad despite saying it will*) (*based on a single case I saw), or because the itunes media folder was migrated.
    Furthermore, my solution was to tell her how to backup her ipad (by either doing it manually, or as a last resort, by deleting the corrupt backup -- that she couldn't access anyway.)
    I got that last part of the instructions from the "Taking Control of your iphone" book which I found samples of when I did a google search for "corrupted backup itunes".
    She marked this as a solution, so it worked for her.

  • Which is the earliest generation iPod touch that will sucessfully stream BBC iPlayer listen again programmes wirelessly to a dock?

    My second generation touch runs IOS 4.2.1 and will no longer update. What is the earliest generation that will run the necessary software to stream radio programmes wirelessly via the BBC iPlayer "listen again" facility?

    According to this wikipedia article, http://en.wikipedia.org/wiki/IOS_version_history, you need an iPod Touch 3rd generation or iPad 1st generation as minimum to run iOS 5.1. However, if you are going to get a new (or newish) device, I would recommend getting a more recent model for a bit of future proofing - the next time the BBC updates the app it will probably raise the minimum version of iOS too.

  • Which is the oldest version of firefox that is still supported?

    Is version 3.0x reached end of life? We need to determine from which version and above should we be making our app compliant. TIA.

    Yes, support for the Firefox 3.0.x branch has been ended and updates are no longer released.
    Only 3.5.x (currently 3.5.14) and Firefox 3.6.x (3.6.11) are currently supported and still receive updates.<br />
    When Firefox 4.0 gets released (end this year or maybe next year) then support for Firefox 3.5 will end as well about 6 months later.
    https://wiki.mozilla.org/Releases

  • What is the GRANT or permission setting that allows viewing of package body

    For purposes of SOX and security/audit control, we log in under our network id's in our production environment. We have sourcecode compiled into Oracle seeded schemas ( APPS ) so that scheduled jobs are able to run with submitted from the Oracle Applications environment. We don't compile code into our personal network account areas.
    I know how to GRANT EXECUTE privs so that we can execute a package in another schema, but what I want to do is to be able to view the sourcecode in another schema. Compile into APPS but be able to see the package body from my network id schema account.
    I can't seem to find what the correct permission is anywhere. Granted I can look at DBA_SOURCE to get to it, but I want to use a tool like SQL Developer or TOAD to look at the code in a more presentable and easier to debug manner.
    Any help ?

    I guess you need GRANT DEBUG ON SCOTT.PKG TO U
    SYS@LSC01> create or replace package scott.pk is procedure p; end pk;
      2  /
    Package created.
    SYS@LSC01> create or replace package body scott.pk is procedure p is begin null; end; end pk;
      2  /
    Package body created.
    SYS@LSC01> grant create session to u identified by u;
    Grant succeeded.
    SYS@LSC01> grant execute on scott.pk to u;
    Grant succeeded.
    SYS@LSC01> connect u/u
    Connected.
    U@LSC01> select text from all_source where name='PK';
    TEXT
    package       pk is procedure p; end pk;
    U@LSC01> connect / as sysdba
    Connected.
    SYS@LSC01> grant debug on scott.pk to u;
    Grant succeeded.
    SYS@LSC01> connect u/u
    Connected.
    U@LSC01> select text from all_source where name='PK';
    TEXT
    package       pk is procedure p; end pk;
    package body       pk is procedure p is begin null; end; end pk;

  • The new Firefox version disabled one of my toolbars and I want the older version of firefox that allows me to use that toolbar. How do I get it back?

    I have the Norton toolbar and it got disabled once I downloaded the new firefox version. I would like the version I had before. I believe it was 3.6 or something like that.

    Follow TonyE's instructions [https://support.mozilla.com/en-US/questions/818638 in this post.]

  • Which is the best headphone and applications to allow me to hear those sound on the websites ?

    At present hearing too sound using the headphone is too loud for my hear.

    Mr. Burger... I didn't know you spoke mumble. 

  • Which is the best headphone and applications to allow me to hear those sound on the websites ?using them ?

    At present hearing them using my headphone are too loud for my ear.

    Why did you double post?
    http://www.etymotic.com/ephp/er4.html

  • How to get a specific layout with the available layout managers?

    Hi
    Not done java GUI's (approximately 5 and a half years) for a while (I havn't even touched java for ages until a few months ago), and I am a little embarrased by how much I have forgotten.
    After tring unsuccessfully several times with TableLayouts and GridBagLayouts to produce this [ [http://i32.tinypic.com/fl94kp.png] ] sort of layout, I have decided I am either being incredibly stupid, or It's a rather difficult thing to do.
    (Sorry about the crudeness of the drawing)
    Please can someone point me on the right track as to what combination of layout managers + components I should be using to achive this, or even be super kind and post a code snippet for it.
    Preferably, I would like to use just the default layout manages / components that come with java, which will allow me to continue working on the GUI in netbeans without it complaining, but I'll use external libraries if absolutely nesecarry.
    Thanks
    A completely unrelated side note, but where the heck have all my past posts and dukes gone. :(
    Edited by: DarthCrap on Aug 2, 2010 5:14 PM

    Yes, A BorderLayout did solve my problems. It appears I was being stupid after all. :)
    @Encephalopathic. Using a gridbaglayout does indeed help with the centering issue for the smaller panel on the right. I had just worked that out myself when you posted. I had been reluctant to try the gridbaglayout for that, because it caused me a load of pain when I tried using it for the original problem.
    Thanks

  • Which is the best way for creating video placeholders in AE?

    I should create some video placeholder for AE animation, but I am not sure which is the best approach to do that.
    I found some tutorials on the web where is explained how to create basic placeholders in AE, but I want to do something better.
    Could I create some placeholder even in Photoshop? And after that to import this psd files into AE.
    I saw some intersting placeholders on Videohive but I don't know how to create something similar?
    Any help?
    Regards!

    Any layer may be replaced with new footage by simply selecting the layer you want to replace in the composition, then selecting the new footage in the project panel, then holding down the Alt/Option key and dragging the new footage to the composition.
    If you want to automate the process of replacing footage you'll have to use a script.
    If you want to use a project as a template then simply copy the template file in it's folder and paste it into a folder that contains the same structure as the template. IOW, the folders should look like this:
    Template Project
         >template.aep
         >Footage
    New project
         >copiedtemplate.aep
         >Footage
    Your footage has to have the same filename as the original template project.
    You can also save an AE project as a template (aet) project. That's what they are doing on siges like Video Hive. The template isn't easily overwritten so it maintains the work. Then you simply add your footage using the first technique that I talked about.

  • Which are the lab view compatible processors or microcontrollers

    Hello All
    I am an engineering student. And I am new to LabView
    I have a program which is compiled using LabView. I wanted to know which are the micro-controllers or processors that are compatable with labview. So that i can dump the program and start working on my project.
     

    Your question is not clear. What do you mean by "dump the progream and start working on my project"? Dump where? New Jersey?
    Are you asking what the system requirements are for running LabVIEW? If so, then you can find that here (which you would have easily found if you had tried a search). Or, are you asking what microcontroller you can program? The answer is none, unless you also have the LabVIEW Microprocessor SDK, which costs $12,000.
    Please provide more details or a better explanation of what you're looking for.

  • Which is the latest version of firefox for centos 5.6

    Dear Sir/ Madam
    We are using CentOS 5.5 and CentOS 5.6 on systems in our office.
    Can you tell me which is the latest version of firefox that will work with such OS?
    Also if you could provide the installation steps that would be great!
    Regards
    Nitin

    You would have to check the System Requirements for GTK+ and GLib of later Firefox versions to see if you meet them in your Linux distribution.
    They haven't changed according to the system-requirements pages, so if Firefox 17 works then 33 should work as well.
    *https://www.mozilla.org/en-US/firefox/17.0/system-requirements/
    *https://www.mozilla.org/en-US/firefox/33.0/system-requirements/
    See:
    *http://kb.mozillazine.org/Installing_Firefox#Linux

Maybe you are looking for

  • I have 3rd Generation IPod Touch, it does not boot up.  We have tried to restore, but we are stilling receiving errors.  Any ideas?

    I have a 3rd generation IPod Touch that no longer boot up.  I've downloaded the recovery, but it does not work.  It just lights up briefly and then we receive a message that the IPod drivers are not readable.  Any ideas what we can do to resolve?

  • Solaris HotSpot Virtual Machine Error, Unexpected Signal 11 NEED HELP

    Hi all We are running a thin jsp application for video streaming live event running on a BEA WebLogic Personalization Server 3.2 on Solaris (streaming servers are separate and do not affect the server). After putting it in production we have experien

  • User Detail

    Hi friends, How to get the details of Plant to which the User belongs.   (ie.,  Based on the logon detail, I want to know the details of Plant or Branch of the user). This is required to be displayed by default in the GUI form I have made. Thanks in

  • Registration Key for Visual Studio 2008 Express

    When trying to register Visual Studio 2008 Express, I get directed to a page that no longer exists. How am I supposed to get a registration key for it? I don't actually need the GUI, just the command line compiler. Is the compiler affected by the reg

  • Re: Too many threads?

    It would depend on the type of application and the target platform but I would certainly agree that 20 would be plenty for the vast majority of circumstances. Writing a Thread pool conforming to the following interface (for example) is quite straight