GroupLayout can only be used with one Container at a time

Dear all,
I am a beginner so please don't throw rocks at me...
I have created two frames with NetBeans. One is the main frame (extends from JPanel) and the other frame I put it to be started when pressing a button from the main frame (the second frame extends from JFrame). Both frames are created using the designer in NetBeans, so the code for creating the GUI is automatically generated by NetBeans, so both frames use the same layout (GroupLayout).
Here is the code of the button from the main frame to start the second one:
private void manageCustomersActionPerformed(java.awt.event.ActionEvent evt) {                                                
        // TODO add your handling code here:
        CustomerGUI custGUI1=new CustomerGUI();//CustomerGUI is the second frame
        custGUI1.setVisible(true);
}When I press this button from the main frame I get this runtime exception: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: GroupLayout can only be used with one Container at a time. The second frame is not opened.
How should I handle this?
What I want to do: I want to have a main frame, from which I can start additional ones (the main frame must be always opened, while the additional ones can be closed after performing certain actions). I read a little about internal frames and I think this can be a solution, but I must edit the existing design...
Thank you
With respect,
Don
Edited by: don1983p on Dec 16, 2008 2:21 AM

AndrewThompson64 wrote:
There are those that maintain that JFrame should never be extended. I am not convinced, but most cases where a JFrame is extended would be better coded as simply configuring the JFrame within the main(). GUI builders such as found in NetBeans seem to extend JFrame as a matter of course.I too am not rigorous or religious about this either, but try to adhere to this as a matter of practicality and convenience, I find that if I don't extend a JComponent but rather use composition rather than inheritance, it's much easier to use objects of my class when programming in Eclipse. For instance in Eclipse (and in most IDEs), if I type my object name and then a period, it will show all of the method's available for me to use on this object. If I subclass JPanel or JFrame, I'll see a gazillion methods most I don't want to see, and thus most are clutter. On the other hand if I use composition, I'll only see a small number of methods and these will be only the methods that I want to see and need to use.

Similar Messages

  • HT1848 I am trying to transfer my purchases from my iPhone 5 to my new Mac computer.  I get the message stating that it can only be synced with one computer at a time.  I have tried the 2 other ways and I get no options to transfer my purchases.  Help?

    I am trying to transfer my purchases from my iPhone 5 to my new Mac computer.  I get the message stating that it can only be synced with one computer at a time.  I have tried the 2 other ways and I get no options to transfer my purchases.  Help?

    If you see Devices in the big list on the left-hand side of iTunes, it should show the name of your iPhone right below it. You can right-click (or hold ctrl and left click) on the name of the iPhone there, and choose "transfer purchases from iPhone".
    If you're on iTunes 11, you won't see the big list of the left until you go to the View menu at the very top (where you see iTunes/File/Edit/View/etc) and choose Show Sidebar. Then do the same thing: right-click or ctrl and left-click on the iPhone's name below Devices and "transfer purchases from iPhone".
    It'll ask you to authorize the computer for your Apple ID if you haven't yet; to do that, you just type your Apple ID and password in when it asks. If it says you are not authorized but doesn't automatically give you an option to do so, then you can go to the Store menu at the very top and choose "authorize this computer".

  • My laptop hard drive crashed - when I go to sync my iPhone it says that my phone is already synced with another computer and can only be synced with one computer at a time.

    My Dell laptop hard drive crashed - when I go to sync my iPhone it says that my phone is already synced with another computer and can only be synced with one computer at a time. When I hit sync is says it will erase my phone and sync with the new computer which is blank. How do I get my phone to sync my contacts, pics, apps etc. over to my new hard drive without losing anything.

    Yes, so what's confusing... Did you not restore the backup of your data, contacts, pics, apps, music, etc. to the new hard drive after you replaced it or reformatted it or whatever you did? If so, then you can just sync your data back.
    If not, please try searching the forum. This has been addressed hundreds of times here.

  • Fedex can only be used with dreamweaver using metric, not pounds (lbs)

    Fedex can only be used with dreamweaver using metric, not pounds (lbs), evidently?
    This as per their tier 2 tech suport.
    They say I should just convert to metric, no joke!
    Any ideas would be greatly appreaciated?
    Also a warning to anyone thinking of using business catalyst for their site, sorry, their business.
    Their note to me:
    Your request (# 82816) has been solved. To reopen this request, reply to this email or go to the Help & Support page.
                  Silviu Ghimposanu (Adobe Business Catalyst Support)           
                  Apr 14 15:23           
        Thanks for contacting us Michael  
    Our engineering team has detected some problems when doing weight conversions (from the quantities entered in the interface to what’s used when making the API calls to FedEx) -
      He have added this to our internal bug tracker to be fixed for one of the future releases. 
        I realise that this might not be what you wanted to hear,but at this moment we do't have a workaround in order to send the
      dimensions in pounds and not in KG 
        Sorry for this inconvenience!
      Kind regards, 

    If you're in US it will be in pounds. If your site is set any other country
    in the rest of the world it will be metric. So BC or as you call it
    Dreamweaver will look at the site country, which you set when creating the
    site

  • Item category S can only be used with account assignment category

    Hello Gurus,
    When i tried to create a PO then error "Item category S can only be used with account assignment category" is coming
    for my plant and material.
    Could you please tell me where i have to maintain the setting of account assignement for a plant or material.
    In TA:-OMG0 item catergory S is maintained for a account assignement F but still this issue is coming.
    I think there is a problem in plant or a material.
    Please help me.
    BR

    Hi,
    How you are creating PO  ,so that you have error "Item category S can only be used with account assignment category"
    Check what t.code used for your PO creation and what document type used for your PO creation- which result defaulting item category S which in turn asking for  with account assignment category.
    Cross check transaction variant or screen variant used for your PO creation!
    Regards,
    Biju K

  • HT1415 You can move the rental between devices as many times as you wish during the rental period. However, the movie can only be played on one device at a time. If you rent a movie on an iPhone, iPad, iPod touch, or Apple TV, it is not transferable to an

    You can move the rental between devices as many times as you wish during the rental period. However, the movie can only be played on one device at a time. If you rent a movie on an iPhone, iPad, iPod touch, or Apple TV, it is not transferable to any other device and you must watch it on that device.
    This is a confusing statement. Can really move the rental between devices or not???  

    If you originally downloaded it to a computer, yes. If you originally downloaded it to an iOS device, probably not; if you want to try anyway, use the Transfer Purchases function in iTunes.
    (85739)

  • Accounts can only be part of one Family at a time.

    I just upgraded my Mac Book Pro to Yosemite and get the following error when trying to start up Family Sharing
    {my appleID} "is used for sharing purchases in another Family. Accounts can only be part of one Family at a time."  I'm not sure what that means or how to fix it.  I'm only part of one family!  I get the same error message trying to start up Family Sharing on my iPhone and iPad.

    Hello Bill,
    Did you find a way to resolve this problem?
    I have the same issue...

  • HT1752 Hi, I want to play my music through my Comp as well as my wireless speaker.. i can only seem to get one working at a time, is it possible to get both working at the same time??  Thanks Kylie

    Hi, I want to play my music through my Comp as well as my wireless speaker.. i can only seem to get one working at a time, is it possible to get both working at the same time??  Thanks Kylie

    Hi Kylie,
    Open Audio Midi Setup in Applications>Utilities, see the input & output options & KHz setting there.

  • SubmitGenerateReportAsync Issue. Await operator can only be used with Async Method

    Hi,
    I am trying to submit a request to download keyword performance report using following .
     var reportId =await SubmitGenerateReportAsync(reportRequest); its giving me error 
    The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
    Here is the SubmitGenerateReportAsync method. I am already using async in definition. Not sure what else is wrong.
     private async Task<string> SubmitGenerateReportAsync(ReportRequest report)
                var request = new SubmitGenerateReportRequest
                    ReportRequest = report
                return (await Service.CallAsync((s, r) => s.SubmitGenerateReportAsync(r), request)).ReportRequestId;
    Same issue with PollGenerateReportAsync
     reportStatus =await PollGenerateReportAsync(reportId.ToString());
      private async Task<ReportRequestStatus> PollGenerateReportAsync(string reportId)
                var request = new PollGenerateReportRequest
                    ReportRequestId = reportId
                return (await Service.CallAsync((s, r) => s.PollGenerateReportAsync(r), request)).ReportRequestStatus;
    Let me know if its easy fix.

    I fixed the link to our
    code example which shows how to run such a report from the console. You would create async methods, run, and wait from within Main.
    /// <summary>
    /// The entry point for the console application.
    /// </summary>
    /// <param name="args">Arguments are not required for this example.</param>
    public static void Main(string[] args)
    var example = new KeywordPerformance();
    Console.WriteLine(example.Description);
    try
    var authentication = new PasswordAuthentication(
    "<UserNameGoesHere>",
    "<PasswordGoesHere>");
    // The OAuthHelper class is available for download with the BingAdsExamples solution.
    // OAuthDesktopMobileImplicitGrant authentication = await OAuthHelper.AuthorizeImplicitly();
    var authorizationData = new AuthorizationData
    Authentication = authentication,
    CustomerId = <CustomerIdGoesHere>,
    AccountId = <AccountIdGoesHere>,
    DeveloperToken = "<DeveloperTokenGoesHere>"
    example.RunAsync(authorizationData).Wait();
    catch (Exception ex)
    Console.WriteLine(ex.Message);
    Best regards,
    Eric

  • I bought a new computer, and i have transfered everything using home share, file transfers, etc.. yet still when i go to sync, itunes tells me ipod can only be synced with one computer... is there a way to retire the relationship with the old computer?

    i bought a new computer.  the itunes app allows for home shareing, file transfers, etc.. but i want to discontinue the syncing with the old computer and sync my ipod touch now only on my new system... but i cant seem to disconnect that old relationship at all.. when i try to syncit says that my ipod is already synced with another computer, do i want to discontinue that and only use the new informationon this computer?  i dont want to do that yet because it doesnt seem like everything has come over, and i am afraid of losing songs that i downloaded from cds, etc..

    if you don't want to sync it because you don't think that everything has been transferred then i would check first if you can, before you commit to used only the data from your new computer.
    though, im not sure if this is true, but i think that when you sync your ipod to a new computer it will take the items from your ipod and put it on itunes, like when you purchase something on your ipod and it gets automatically transfered, but don't take my word for it.

  • I can no longer synch music library and audio books, it says can only be synched with one of the libraries, anyone else had this?

    i had to reboot my laptop, so reloaded itunes sofware, im now finding that when i'm synching my Iphone to synch audio books ive downloaded, , it says its synched with another itunes library ( my music) do i want to erase this iphone and lsynch with this iphone library, the music percentage at the bottom reduces to 0% in prep to erase.
    anyone else got this problem?
    Lee

    try a new/fresh apple brand cable and make sure it is the only usb cable in use. this worked for me, i noticed i had no problem with a lighting cable. i did a restore from scratch and from backup and it did not help me...and if you cant sync than you wont be able to get anything but apps back after the restore

  • Item category D can only be used with account assignment category

    Dear Guru's,
    While creating service PO, i am getting d above error
    wat it is ? Is it mandatory to maintain Ac assignment cat along with item cat for service PO ?
    regds,
    CB

    hi
    Item category D is used for services .services can not be stocked like stock item... these are for direct consumption hence account assignment is mandatory for Item category D
    u can enter K or U as account assignment and proceed with PO creation
    Vishal...

  • Why does my ichat say I can only video chat with one person?

    PLEASE SOMEONE HELP!

    Are the buddies Mac or PC users.
    What account are you using ie:AIM, Gtalk.....

  • Hyper-V Only able to run one VM at a time

    Hi all,
    I have Hyper-V set up with about 3 VM's on Server 2012, but i can only seem to run one VM at a time.
    The server has the following:
    32GB Ram
    1TB HD with 425GB free
    When i have one of them started and running, it works just fine.
    As soon as i try to run a 2nd VM, i get the following error:
    "'PC1' failed to start.
    Microsoft Synthetic Mouse (Instance ID 58F75A6D-D949-4320-99E1-A2a2576D581c): Failed to Power on with Error 'The name limit for the local computer network adapter card was exceeded."
    I have tried to do the following:
    Disable all networking on each guest VM
    Removed DVD Drive
    Increase MAC range
    Set static MAC
    Changed boot order to put the CD to the bottom
    Disable the integration services from each VM
    Each VM has different netBIOS name
    Each VM has a different VHD and OS
    When starting the 2nd VM, it gets to about 10% and then shows the above error message.
    Is there anything anyone can suggest?
    Thanks

    Hi Skaliam,
    What is your VM's OS ?
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Using windows vista with two users and I can only open books with adobe digital editions on one account?

    using windows vista with two users and I can only open books with adobe digital edition

    You must authorize the second computer with the same Adobe ID.
    There are sometimes issues with this registration: if you have them ....
    Sometimes ADE gets its registration/activation confused and in a semi-authorized state.
    Uninstalling and reinstalling does not help.
    Unfortunately, it often then gives misleading error messages about what is wrong.
    A common incorrect message informs you that the ID is already in use on another computer and cannot be reused.
    This can often be resolved by completely removing any authorization using ctrl-shift-D to the Library screen on ADE (cmd-shift-D if on Mac).
    Restart ADE, and then reauthorize with your (old) Adobe ID.

Maybe you are looking for

  • Missing Photos and albums in iphoto on the iMac (2012)

    on the imac I´m missing all the photos till 2011, and on the macbook air all till 2008 and between 2008 and 2011 i`m also missing some. Has somebody any idea why iphoto doesn´t show or has deleted all the photos and how can i bring them back? On the

  • No one knows how to fix! Help me!

    I'm posting this after a couple of days running around on the net and several calls to the "apple call center" with no answers. Here is the problem: My 2gig iPod Nano's screen never changes off of the language screen. This is what I've done: Pressed

  • What is FM VC_I_GET_CONFIGURATION actually used for?

    Hello ABAP Gurus I just want know what actually the FM VC_I_GET_CONFIGURATION used for. What are the input parameters for this function and also what kind of information can I get by calling this FM. Any feedback on this will be greatly appreciated.

  • Template based files in CS3 not updating

    Hi! I'm having problems working with Templates in Dreamweaver CS3. Basic operations like creating new template, defining regions, etc, works normally except for Updating Files based on the template action. It will display the Update Files status wind

  • Widget (interaction) size and font issues when published in HTML 5

    I'm using Captivate 7 and when I create and preview widget interactions (accordian, tab, etc.) the sizing and font look correct. However, when I publish it to HTML 5, it is not the right size, is left justified rather than centered, and does not have