What are the best Layout Managers to use in these cases?

(1) I have a form with labels at text fields. Right now, there are three lables and three text fields. There is a good chance (90%) that I will need to add additional fields and labels, so it needs to be expandable. Now, all of these features reside on a JPanel which resides as a tab in a JTabbedPane which resides in a JFrame. Regardless of the size of the JFrame, the contents of the JPanel should be their default sizes. Also - if anyone says SpringLayout, no - I use the code for the SpringForm from the Java tutorial, and I always get exceptions related to arrays (out of bounds, IIRC - I don't have the code on this PC).
(2) I have another form (of sorts) that, right now, includes only one row of three components (a label, a text field, and a button). However, There's a 99% chance I'll be adding other things to this menu. What's a good layout manager that will help me keep everything their default sizes as well as add more "rows" of components that might have different numbers of components in them?

If you really want advice then you need to learn how to specify requirements.
1) "I have a form with labels at text fields. Right now, there are three lables and three text fields."
and how do you want the component layed out????
a) do you want all the fields on a single line, in which case you would use a FlowLayout or a horizontal BoxLayout.
b) do you want all the fields on separate lines, in which case you could use a vertical BoxLayout
c) do you want pairs of label and text fields on a single line? If so, then do you want each lable and text field in a column? If so then do you want the labels left or right justified, or centered? You have many options depending on your requirements:
- use a GridBagLayout.
- use a GridLayout. Each cell will be the same size but you can add your components to a JPanel first and then add the panel to the GridLayout. In this case the panel will be resized, but the component will retain its original size.
- use a BorderLayout.. The West will contain a panel of your labels in a GridLayout. The East will be the text fields in a GridLayout.
- figure out how to use the SpringLayout correctly. The demo doesn't cause errors, so its obviously your code that is causing the problem. Do some debugging to fix your problem.
- write your own LayoutManager. I wrote one which I called ColumnLayout, which I posted in the forum somewhere. It is like the GridLayout excepct each column is the widht of the widest component in the column and each row is the height of the talles component in the row.
2) Learn to mix and match LayoutManagers.
includes only one row of three componentsSounds like a FlowLayout
as well as add more "rows" of components that might have different numbers of components in them? Sounds like another FlowLayout.
Each row would then be added to a main panel using a vertical BoxLayout.
The point is you are not restricted to a single LayoutManager for a form. Mix and match to get the effect you desire.

Similar Messages

  • What are the best export settings to use...

    Operating system: Vista SP1
    Camera: Canon HF100 (1900x1080 HD quality 29.97fps) -- uses AVCHD compression which is H.264 I believe.
    I'm able to watch my camera video files in Vista nicely. However, I'm having trouble with the watching the results of my edited and exported videos. Assuming I want the same quality and playability as the source video, what settings should I use in the export?
    In the export settings window... I select:
    Format: H.264
    Preset: HDTV 1080p 29.97 High Quality
    Source files have the extension: .m2ts
    ...I don't change the other values. Then I export. Now the result is an .mp4 file which does not play in Windows Media Player. It does play in Quicktime or iTunes however it plays jerkily... I would like to be able to play it as smoothly as the original source plays... And I'd like to be able to play it in windows media player just as the source can be played in media player. Media player seems to play the source more smoothly than does iTunes or Quicktime.
    So what are the best export settings for me so that I can watch my edited HD video on my computer as easily as the source footage???
    I've been able to edit and save the results of the edit using the crappy ImageMixer3 video editor that comes with the camera. The results are perfect and play in windows media fine. The files it exports the edited video as is the same as the soure... the file extension is .m2ts
    So the problem is how to get Adobe to export the edited video to an .m2ts file or at least to a file type that plays as nicely in my system?

    See
    Exporting to iPods, cell phones, PSPs and other mobile devices in the PPro Help for details.
    Cheers
    Eddie
    PremiereProPedia   
    RSS feed)
    - Over 350 frequently answered questions
    - Over 300 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

  • What are the best storage devices for use with Time Machine?

    My backup and storage requirements are minimal but still important to me.  What storage devices do my Apple using Compatriots find the best for data storage.  I do think that the Time Machine is a more than adequate program for my needs but would be happy to hear any other suggestions.  All input will be appreciated.

    It's been moved and seconded. Any discussion? Yes:
    Buy two external drives. Use one for Time Machine. Be sure this drive is at least twice the capacity of your computer's hard drive. Use the second drive as a bootable clone of your computer's hard drive. Should something happen you can immediately get the computer up and running from the clone until your restore from the Time Machine backup. This is what is called redundancy. Should either backup drive fail, there's another to take its place. Backup redundancy is very important. You can never have too many backups.

  • What are the best instagram video settings using Compressor 4?  The outputs I have created look clean HD in camera roll.  When I view video in instagram preview it looks great, but then when i post it the quality gets blurry. Any advice?

    I have read that you should resize the frame to 640 by 640 or 1000 x 1000, and have tried both.  I shot the footage on canon 70d using 720p60fps, and edited the footage with iMovie.  Its been frustrating to see the finished product look great on iPhone, iPad, or mac but once i post the video- the quality gets blurry when you focus on the faces that are in focus.  My footage is basketball action shots from a high school game.  Any advice would be huge, I been looking for an answer to this for a month. 

    Simple export a ProRes 422 file, upload that by itself.  Facebook, Vimeo, YoutTube, etc, all compress the video themselves.  So don't compress it first, just upload it and let them do their own compression.

  • In your experience what are the best audio units to use

    I hope that some of you folks are open to sharing some of your presets with others who aren't quite as good at toggling the audio unit section of garageband. I'm actually surprised that no site has sprouted up offering file downloads of presets for this section. Without the use of this section many mixes come out sound completely amateur and no better sounding than a 4-track recording vocals on a busy noisy sidewalk. For example I use the augraphiceq but it has no presets, which *****. I understand every voice has its own settings needs in editing or mastering, I just wish garageband offered a wide range of popular presets.
    So let me get to what I am in need of from you wise fellow apple seeds, what au's do you use for hip hop vocals/ rock vocals/ or any genre you record. The master presets section do you use any? If so what do you use?
    Can you detail your setting so I can create a duplicate to use myself ?
    Thank you

    Convert the footage to QuickTime DV, interlaced, lower field first with audio at 48khz, 16 bit.  In FCE, use the QuickTime DV setup.
    -DH

  • What are the best ways to recycle used Apple products?

    I currently have a iPhone 4 (32 GB, Black) and a Macbook Pro (Mid-2009, 2.53 GHz, 250 GB storage, 4 GB memory) that I don't use anymore. I'm looking into recycling them or selling them but I'm not sure about:
    a) What the products are worth - the iPhone looks brand new and the Macbook Pro is in fair condition but needs a battery replacement
    b) Which recycling programs to go with - Apple's PowerON program has shady reviews and I'm not sure whether to trust sites like 'gazelle'
    If anyone has any advice on recycling or selling their Apple products, let me know. Thanks!

    jess_ek,
    To get an idea of what the products are worth, take a look at recent winning bids on online auction sites for identical items to yours in similar condition.
    If you prefer to recycle rather than to sell, you could donate them to iFixit, which will make maximum use of their parts to help keep other iPhones and MacBook Pros running. If you’d prefer to sell them, you could offer them as individual lots on online auction sites, or advertise them for sale on online classified ad sites.

  • What are the best settings to use for the newest AirPort Extreme (AC wifi) with my optimum online service provider?

    I have the current generation of the AirPort Extreme and a handful of devices that utilize the new 5Ghz A/C frequency. My internet speeds were blazing fast when I had first set it up but lately it has been lagging terribly. I was told that changing my dhcp did help, which it did it seems like it might be back to its normal speeds but I just want to know what are the best settings to configure for the airport so that I can get the most out of my service on all my devices? I'm using a CAT 6 cable which does help, I have a guest wifi setup with a wifi password which I understand will slow it down a little. Can anyone just point me in the right direction or just give me a step by step guide on what settings to configure? Should I really consider turning off the guest network?

    I am assuming that you are looking to configure your network to provide the highest level of bandwidth possible for your network clients. If that is the case, the following are a few things to consider:
    The Internet modem should support Gigabit Ethernet. That is the Ethernet connection between the modem and your 802.11ac AirPort Extreme should be Gigabit Ethernet.
    Use CAT-5e or CAT-6 Ethernet cables between all wired connections.
    Only expect 802.11ac performance with 802.11ac clients in the same room as the base station.
    Eliminate or significantly reduce any forms of Wi-Fi interference on both the 2.4 & 5 GHz bands.
    When streaming, especially HD video on your local network, use wired connections between the host and player devices when possible.
    Other than the above suggestions there are no "magic" settings that you can make on your AirPort. Note: The Guest network shares the same bandwidth as the "main" network. Unless you have a network goal to provide this type of network, it is best left disabled.

  • What are the best Voice to Text app's for use in classroom?

    What are the best Voice to Text app's for use in classroom?

    Hi I did download the software you suggested which you mentioned in in our iphone.
    However the This did not happen to my text
    "text it will appear a botton "Talk" and you're going to have a Text-to-Speech."
    I have to hold my finger on the taxt and it says copy and next word is text. so the text needs to behightlighted each time till the end, which is difficult to do. why does the "talk" appear on the bottom?
    What do I need to do for that to appear?
    Thank you in advance for the rplies.

  • What are the best Voice to Text app's for use in business meetings?

    What are the best Voice to Text app's for use in business meetings?

    Hi I did download the software you suggested which you mentioned in in our iphone.
    However the This did not happen to my text
    "text it will appear a botton "Talk" and you're going to have a Text-to-Speech."
    I have to hold my finger on the taxt and it says copy and next word is text. so the text needs to behightlighted each time till the end, which is difficult to do. why does the "talk" appear on the bottom?
    What do I need to do for that to appear?
    Thank you in advance for the rplies.

  • What are the best devices to use in my car to listen to music on my 3rd gen iPod Nano?

    What are the best devices on the market today to use in my car to listen to music on my 3rd Gen iPod nano?  I currently use the Monster device that plugs into the electrical adapter (former cigarrette lighter!) in the car.  It's a pain in the neck to manually search for unused FM stations on a long trip. I want something that automatically searches for unsused FM stations or, better yet, that will allow me to somehow connect the iPod into the CD player or directly to the radio itself.  I have a 2004 Toyota Highlander.
    Any suggestions for quality after-market products from the Forum?

    If you have files with the .m4v or .m4a extension its better to change them to .mp4. The M4 extensions will sometimes download in the browser instead of playing.
    A usefull free app for file conversion is Miro...
    http://www.iwebformusicians.com/Website-Movie-Video/Easy-Movie-Player.html
    It can quickly convert to all the formats you need to load for html5 playback: MP4, OGG, WebM
    If you include these three, fallback to flash will only be required for Internet Explorer V 8 and older. V 9 is supposed to support html5 but I haven't actually seen any proof of this.
    Players like flowplayer and JWLongtail are convenient because the control bar icon be customized. This lets you get away from the nasty looking QT control bar.
    http://www.iwebformusicians.com/Website-Movie-Video/JW-Media-Player.html
    http://www.iwebformusicians.com/Website-Movie-Video/Flow-Player.html
    "I may receive some form of compensation, financial or otherwise, from my recommendation or link."

  • What are the best storage systems to archive inactive (but still used) apps and files?

    What are the best storage systems to archive inactive (but still used) apps and files of all types? I already have a Time Casule which I back up on and I'm needing to create more space in my flash drive in my Mac Pro, so I need another external storage system I can use to archive all that I don't currently need. I may still wish to edit and use the files, and I am not very techy and am a broke student... so anything grossly expensive is a no-no for me (between $50 and $200 is idyllic). If you could simply post links of different good/useful hard-drives that I can use, I'd be thankful.
    Thank you
    p.s. I'm australian, so anything within this country would be great. Or I can deal with somewhere that has cheap shipping.   

    It's been moved and seconded. Any discussion? Yes:
    Buy two external drives. Use one for Time Machine. Be sure this drive is at least twice the capacity of your computer's hard drive. Use the second drive as a bootable clone of your computer's hard drive. Should something happen you can immediately get the computer up and running from the clone until your restore from the Time Machine backup. This is what is called redundancy. Should either backup drive fail, there's another to take its place. Backup redundancy is very important. You can never have too many backups.

  • How do i transfer DVD files to my Ipod?  What are the best programs to use?

    I have an annoying time trying to get DVDs onto the Ipod. I can't help but think why Apple didn't make it easier to do this. Does anyone know how to get DVDS into the Ipod and what are the best conversion programs?

    The iTunes/iPod ecology is designed to make it hard to use the iPod for casual copyright theft, but extracting your data is eminently feasible.
    You should be able to recover the media with the tips in  this post from forum regular Zevoneer. Data in your apps is potentially at risk but you can probably transfer your purchases into a newly authorised library, backup the device, recover any other media using third party tools, then restore the device from the backup. That should switch the assocation of the device to the new library but I've never needed to test the method so I can't say for sure.
    tt2

  • What are the best settings for video  compression if my end result is for use as  progressive .flv

    What are the best settings for video compression if my end result is for use as  progressive .flv.?
    Thanks,
    KIM

    Use the Final Cut Studio forum
    http://discussions.apple.com/forum.jspa?forumID=939

  • HT202665 What are the best Discs to use with my Apple USB SuperDrive?

    HHi,
    i have an Apple USB SuperDrive, would like to know which are the best Blank Discs to use please, I live in the United Kimgdom

    I don't use so many disks nowadays but when we do, I really only try to make sure they are a recognised brand (Phillips, Maxwell, TDK etc etc), technology has moved on from having to worry about which you use. I would avoid brands you've never heard of though.

  • What are the best practice in report design ?

    Hi,
    According to you, what are the best practices in report desing about layout, fonts and colors ?
    Thks

    Hi,
    It all depends that what type of report you are designing and what tool you are using - WebI or Crystal.
    And in WebI, if it is cross tab or Tabular report etc.
    One most important thing is that what is client requirement. May be client does not like which is best practice.
    On the base of my personal experience I will create few demo reports using different options - layout, colors and fonts and show them to client so that they may decide.
    Regards,
    Bashir Awan

Maybe you are looking for

  • Extraction in debug mode without RSA3

    Hi, does anyone know, if there is a way to run an extraction in debug mode on the R/3 side without using RSA3 or RSA7? It has to be a real delta extraction triggered by an InfoPackage in BW. I've also tried the "simulate update" function in the monit

  • Micro SD / transflash probems

    I haven't been able to connect my new MacBook to my Nokia phone or its card alone (using external card reader). When I try to mount the card, nothing happens. If I open "/Volumes", though, there's the name of my card, and shows as read-only. Inside i

  • Brother printer not working after update

    I downloaded OS X 10.8 and now my Brother printer MFC-J430w-2 will not print. I went to brother's web site and DL'd the drivers I think are correct but the computer wont let me open then. Any ideas? Thanks in advance!

  • Anyone using Secure SMTP in SquirrelMail ?

    Secure SMTP and Secure IMAP working fine with all Email clients. Secure IMAP works with SquirrelMail. But SMTP does not. I would like to know if anyone is using Secure SMTP in SquirrelMail. I get a message "Connection Refused" when I try to send an e

  • Servere overheating problems on my T500 =/

    i've been having overheating problems for about 2 month now, basically have had to keep tpfancontrol running to keep from shutting down, constantly 95c ish. goes up to 110c and than shuts down. I cannot even reinstall windows without significant issu