Damn peculiar bug -- transferring JComponent from one place to another

I have a JSplitPlane, which has a JTree in the left side and the right side gets a JPanel depending on what is selected in the JTree. This works great.
Although this is probably not relevant, I also save the non-selected JPanels so they aren't re-created again when selected again. That works great too.
So next I implemented a "tear off function," where I take the currently displayed JPanel and create a new JFrame to put it in. This allows the user to display any number of panels. This also seems to work. Here is the code that does it:
  public void tearOffPanel() {
        JComponent component = (JComponent) splitPlane.getRightComponent();
        if (component == null || component == hitherePanel) return;
        // if component is already torn off, ignore ths
        if (tornOff.containsKey(component)) return;
        // create a new frame
        splitPlane.setRightComponent(hitherePanel);
        JFrame frame = new JFrame();
        frame.setTitle(modelTree.getSelectionPath().getLastPathComponent().toString());
        frame.getRootPane().setLayout(new BorderLayout());
        frame.setLocationRelativeTo(getFrame());
        frame.setSize(component.getSize());
        frame.getRootPane().add(component, BorderLayout.CENTER);
        frame.addWindowStateListener(this);
        frame.setVisible(true);
        // add to torn off map
        tornOff.put(component, frame);
    }What goes wrong is some of the Swing controls in the moved JPanel don't work right after the move. If have some radio buttons -- they work fine. I have some ComboBoxes -- they work if you use keystrokes but they no longer show their popup window and you can't operate them with the mouse. You can focus on them with the mouse and change the selection with the keyboard.
Any ideas on why this could be? I'm stumped.

I'm curious why you are adding things to the rootpane and not the contentPane.
I have no idea if this can cause problems, but it seems atypical to me in the very least.The reason is because I blew it -- I picked the wrong option on auto-complete in netbeans. As I mentioned I am not that familiar with Swing (learning more every day) and these days MOST of this code is auto-generated for you so this kind of mistake doesn't often occur.
The answer is yes it does cause the problem. When I changed the add from RootPane to ContentPane the problem went away.
As you posted I was able to re-create the problem with an example I was about to post. The interesting thing about it is that it does not come up in a generalized way -- if I move the JComponent from the right side of a splitPlane to a new JFrame it CAN happen -- if I move it from a JPanel it doesn't. Further, in my test case it only happens if you resize the source frame before you do the move. Something subtle is going on there but I can ignore it now since using the correct target pane causes no problems.
Thanks for your help.

Similar Messages

  • When dragging a thumbnail from one place to another, the origional thumbmail ends up in other locations.  Sometimes the same thumbnail covers up other thimbmails.

    When dragging a thumbnail from one place to another, the origional thumbmail ends up in other locations.  Sometimes the same thumbnail covers up other thimbmails.

    Hi christophers37215878
    Please elaborate your issue.
    What exactly are you trying to achieve?
    Which Adobe Product or service are you referring to?
    Can you please provide the screenshot?
    Regards,
    Rahul

  • Transfering effects from one project to another?

    In audition 1.5 is there anyway to transfer the effects used onto a new project? Im more based around pro-tools and i know this is possible there, however new to audition,
    Cheers

    I'm not sure if I expressed my need clearly however a clone of my information for the sake of protecting my files is exactly what my goal was and is. I want to "clone" the information from my iMac to my Macbook so that my files are backed up and useable on both computers. This will protect my data and enable me to use my data on both computers. I had nothing to lose by using the migration assistant from the iMac to the Macbook because the Macbook is virgin so nothing data wise of a personal nature was on it ... and I was able to transfer the data. The problem is the files and all their attachment files that got transferred are not in the proper place for Logic to recognize and use and I don't know how to get the 100s of iTunes songs i transferred into iTunes. The migration assistant migrated the files however the intended programs on the computer that received the files don't SEE them. What good is a transferred protected file if you can't get it to run? That's my problem and I've no doubt it's something I simply don;t understand about how Apple computers work.
    So i totally agree with you, I need to back up my files. And being able to do that successfully from one Mac to another in a form where the files can be used by the intended program on the computer that receives the file is exactly my goal.

  • Transfering songs from one computer onto another...

    My Brother has an ipod mini (as I used to) but our computer is so old that it can only hold one ipod (Therefore, I returned my ipod so he could use his). However, several months after I returned mine we bought two new computers, but still kept the old computer. After this I bought an ipod nano and have been using it on my new computer. Although we are glad that we can both use our ipods efficiently (on seperate computers) he is afraid that the old computer might crash soon. I tried putting his ipod into disk mode and tried transferring it to his [new] computer over a month ago, but it was too confusing and did not work correctly. Is there any possible way to transfer it without the directions being so confusing? Or could someone kind of "Translate" the directions for us?
    <center>Thank you so much,
    <center>pnkpolo92

    How to Copy and Move (Clone) your Music Files from One Computer to Another – or Archive Prior to a PC Re-Image or Reformat
    This is the conceptual framework with related and important links. Apply and adapt it to your specific situation and equipment resources.
    The safest, quickest, and most optimal method to move your Library to a new computer is to actually clone the entire ‘iTunes’ folder (directory) structure, rather than just copying just the song files. By copying the entire ‘iTunes’ folder and all sub-folders, you capture not only the music files, but the all-important ‘iTunes Library.itl’ database file (usually located in the ‘iTunes’ folder), which contains all the data about your songs (Playlists, Ratings, Play Counts, Last Played, Date Added, etc). See: What are the iTunes Library files?
    Install iTunes on the new computer. Then go back to your old computer and move (copy) the "iTunes" folder which usually resides inside your "…\My Documents\My Music" folder from the old computer to the exact same place (both Drive Letter and complete Path) on the new computer. When you open iTunes on the new computer it will look and behave exactly the same way it did on the old, Play Counts, Ratings, Comments and all!
    NOTE: It is usually safer moving files between computers with the same version of iTunes!!
    iTunes Files to Copy and Move to your New PC
    1) All music files in their current folder structure (usually located in and under the ‘iTunes Music’ folder)
    2) The Library database file: ‘iTunes Library.itl’ located in the ‘iTunes’ folder
    3) The Library XML file: ‘iTunes Music Library.xml’ located in the ‘iTunes’ folder
    4) Any XML playlist files you created for Playlist retention
    5) The two iTunes.pref files (optional)
    -- C:\Documents and Settings\<your username>\Application Data\Apple Computer\iTunes\iTunes.pref
    -- C:\Documents and Settings\<your username>\Local Settings\Application Data\Apple Computer Inc\iTunes.pref
    6) The XML file of Ratings, Play Counts and Last Played attributes saved from the main Library and created by Otto’s SaveRatings script (also optional, but recommended):
    “Download this: http://ottodestruct.com/itunes/SaveRatings.zip . It's a program, just run it like any other program. Run it on the machine where you're copying the info from BEFORE you move the files to the new machine. Click the "Save Ratings" button and it'll create a ratings.xml file. Now when you move the files, move the program and this file as well. Then after you make your new iTunes library, run it again and click the "Restore Ratings" button. Voila, all your information is back in the Library. Well, most of it anyway, it's not perfect. It'll tell you what songs it couldn't figure out though, and there's usually not very many.”
    Here's a list of methods to copy and move your music files from one computer to another:
    1) Use an External Hard Drive (ExHD) to move the complete files and Folder structures from one computer to another (my preferred option). You can clone’ the entire ‘iTunes’ folder structure in one very easy step. Also great to have available for complete backups of your Library. External hard drives now run less than $100 for 200-250GBs of storage. See This Link
    2) Directly connect the two computers....
    - 2a) Connect them through a Router &/or Network
    - 2b) Directly connect using an Ethernet cable: Straight for using at least one Mac; or Crossover for PC/PC Instructions here.
    - 2c) Connect them via a USB-to-USB Network Bridge. Example here. There are various types out there (use Google).
    ....Then copy the files from one computer to the other.
    3) Use the iPod as a transfer device, as this extensive Apple link explains. It will be a bit easier if your iPod has a larger capacity than your music collection, otherwise you will need to perform multiple copy/move transfers. This well written process also works fine while using any other data transfer medium (ExHD, Flash Drive, DVD, CD, Zipp, Jazz, etc.).
    4) Burn several DVDs (at 4.7GBs each) with your music data files and folder structure, and load them onto the new computer. Re-writable DVDs are more cost effective (if your DVD drive can manage these types).
    5) Burn 6x more on CDs (at 700MB each) than in #4 above and load the files and folders on the new computer. Re-writable CDs are more cost effective (if your CD drive can manage these types).
    6) Use a larger USB Flash drive (1GB - 4GB) to move the files and folders. Best if the flash drive is larger than your Library, otherwise you will need multiple copy/move transfers.
    These are links to various additional instructions on performing the transfer (read them all, but some listed steps may not be required depending on your specific situation):
    Switch from PC to Mac Using the iPod
    hudgie: Migrating iTunes for Windows to a new PC
    How to copy music between authorized computers
    Also, remember to Deauthorize your PC before reformatting or disposing of it. Or, if you no longer will use it for iTMS use.

  • Help transferring data from one account to another

    I bought my computer in August 2008 and had previously had an iBook. When transferring my data from my old computer to the new one, I guess I did it wrong so instead of it transferring all to the same place it created two accounts.
    Is there way to transfer my music/pics etc to my main account?
    Also, my iphone is backed up the other account because thats where all my music is, is there a way to also keep all this data once I am using only the main account?

    When you use Migraine Assistant, it transfers the account of the older machine to the newer because the users name is involved in everything, like iTunes playlists etc.,
    Since to run Migraine Assistant you need to have gone through setup on the Mac and created the main Admin account, when you Migrate, you transfer the other account so you wind up with two accounts on the new machine.
    All you have to do is log into the Admin account of the first user you created, then change the acount status of the Migrained account to Admin and reboot, check it out well, then delete the first Admin account at your own leaisure. However it's best to leave two accounts on the machine, just in case your locked out for some reason.
    If you rather transfer your files from one account to another use the Shared Drop Box
    If you have three accounts on the machine (original admin and two migrained migrateda accounts), you'll just have to monkey around and clean up the mess.

  • Transferring credits from one account to another..

    Hi there, I have a skype account in my name. I have subscriptions on that account as well as credit. I would like to pay my subscription from my credit amount and as well, would like to transfer credit to a new account I just set up for my husband..how do I transfer my credit to his account please? And how do we pay, not from my credit card but from my credit until the credit is used as I don't need both a subscription and credit. Thank you

    Hi, Cherylgustavson, and welcome to the Community,
    Skype credit, subscriptions, and features can not be transferred from one account to another, unfortunately.  If you have purchased the credit within the past 15 days and not used it, you may request a refund: https://support.skype.com/en/faq/FA12147/when-can-​i-get-a-refund?
    To change the payment method of a subscription from whatever you were using to use your credit, this FAQ article explains how to do this: https://support.skype.com/en/faq/FA1781/how-can-i-​pay-for-a-subscription?
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Transfering items from one customer to another customer

    Hi Gurus,
    I have a requirement where we have to transfer the items from one customer to another customer in the same company code.
    We should also be clearing the items from the old customer as part of the transfer.
    Is there a way/transaction in ECC 6.0 to achieve this.
    This is not a one-time transfer and the business would like the option of doing it every period (on a case to case basis.) so any standard SAP (transaction) way of doing it would be preferred.
    Best Regards
    ew

    Dear,
    SAP provides you F-51 t code to post transaction with clearing.
    Select radio button transfer posting with clearing and press choose open item button. Give customer name whose blance is to transferred and account key as D. Press process open item and in next screen select line items which needs to be posted. Proceed further give other customer number with posting 01 and do the transfer. Hope it will help
    Regards

  • Transferring EVERYTHING from one computer to another w/ same source

    I want to transfer all my iTunes files (playlists, music, play counts, everything) from one computer to another, on account of the logic board of my old one is messed up and I want to get everything on my Mac Book Pro.
    HOWEVER.
    When I was using my old computer, I had my iTunes folder on an external hard drive, which would then be the source of all the music and where the new music would automatically go. So I have the external hard drive, and I can't save the playlists from my old computer because I can't use it.
    So how do I transfer all the information? I've tried doing the whole "delete iTunes Data, import XML file" thing and it says it doesn't detect certain music and therefore doesn't place everything where it needs to be.
    Any help?

    Well the way to work around it I think would be to remove the hard drive from your broken computer, assuming of course that your broken computer is broken because of something else besides the hard drive.
    Put that drive into an external enclosure. Hook up to the new computer. Copy the iTunes stuff from the old drive into the new computer overwriting the existing database files on the internal.
    Now with the other external hooked up, start iTunes and see if it then sees everything properly.
    Patrick

  • Using Terminal to copy all files (hidden and not hidden) and folders from one place to another

    How -using Terminal- can I copy all files (hidden and not hidden) and folders (and their contents) from one place to another

    ditto
    DITTO(1)                  BSD General Commands Manual                 DITTO(1)
    NAME
         ditto -- copy directory hierarchies, create and extract archives
    SYNOPSIS
         ditto [-v] [-V] [-X] [<options>] src ... dst_directory
         ditto [-v] [-V] [<options>] src_file dst_file
         ditto -c [-z | -j | -k] [-v] [-V] [-X] [<options>] src dst_archive
         ditto -x [-z | -j | -k] [-v] [-V] [<options>] src_archive ...
               dst_directory
         ditto -h | --help
    DESCRIPTION
         In its first form, ditto copies one or more source files or directories
         to a destination directory.  If the destination directory does not exist
         it will be created before the first source is copied.  If the destination
         directory already exists then the source directories are merged with the
         previous contents of the destination.

  • Problem transferring website from one PC to another.

    I’m trying to transfer a site from one PC to another, but it won’t open on the second PC. I’ve tried exporting the site definition and also transferring individual files, all to no avail.
    It’s the same copy of Dreamweaver CS4 on both machines (version 10.0, build 4117) but it acts as though Dreamweaver doesn’t exist on the second PC, even when I have it open first.
    Would the fact that the first PC is running Windows 7 while the second PC is running Windows XP have any bearing on it? Or am I doing something else wrong?

    Murray,
    I export to a memory stick and then import it from that. It loads the folder into DW local files on the second PC, but there's nothing inside the folder. It's just empty.
    John,
    I purchased one copy and installed on both machines. They're not networked. I had hoped to keep one PC offline and just transfer files to the other one and use it for connecting to the Internet.

  • Transferring music from one account to another

    I wanted to know if there is any way I can transfer music from one account to another account, my music library has over 1000 songs and i do not want to download them again, is there a way? THANKS!

    Below is the information on how to take the music and transfer it to another machine that will be using the same apple ID.
    But as stated earlier there is no way to transfer music to a brand new Apple ID without having to purchase it again as all music is tied into the Apple ID used at time of purchase.
    Copying iTunes Store purchases from your iPod or iPhone to a computer
    http://support.apple.com/kb/HT1848
    About iTunes Store authorization and deauthorization
    http://support.apple.com/kb/HT1420
    How to back up your media in iTunes
    http://support.apple.com/kb/HT1382

  • Transferring tunes from one account to another

    Apparently I once set up an account with a different name...when I lost my hard drive....now i have 67 purchased tunes that won't load on my iPod because I "don't have authorization to listen to them on this computer." I have tried everything suggested...re-authorizing the computer doesn't do it. Is there anyway to get the tunes purchased under one account over to the current account?

    When you purchase protected content with a certain account, a computer MUST be authorized with THAT account only to play that content. There is no way to transfer ownership of a song from one account to another.
    However, I am not sure why authorizing your computer is a problem. You authorized your computer with your old account which the music was purchased with, and they still didn't transfer?
    I suppose what you could maybe do is contact Apple Support and explain your situation here: http://www.apple.com/support/itunes/contact.html?form=music&topic=Music%20Purcha ses&subtopic=Music%20Overview, but I'm not entirely optimistic they would fulfill that request.

  • Transferring iPod from one computer to another

    I just got a new laptop and it will only let me transfer my purchases to it. How do I move my entire iTunes library from one computer to another, easily?

    Click here and follow the instructions if possible.
    (52033)

  • OIM 11g R2 - Transferring accounts from one user to another user

    Hi,
    In OIM  11g R2,we have a requirement that we need to transfer accounts from one user to anothe user.For example,an user "User1" has AD and Exchange Accounts provisioned.Now we wanted to to transfer these AD and Exchange accounts to another user "User2".May I know how this can be done ?.Thanks

        public void moveAccount(){
            try {
                long newUser = xxxxx;
                long oiuKey = xxxxxx;
                userIntf.changeToServiceAccount(oiuKey);
                userIntf.moveServiceAccount(oiuKey, newUser);
                userIntf.changeFromServiceAccount(oiuKey);
            }catch(Exception e){
                e.printStackTrace();
    -Kevin

  • BADI for transfering data from one modal to another modal within single appset

    Hallo Experts,
    My Business Requirement is Transfer of data from one modal to another in same environment and did this taking reference from below document.(How to custom badi for replicating destination app)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346?QuickLink=index&…
    Document contains TR for implementing BADI, but this document supports bpc version 7.0 and we are using is bpc 10.0.
    So i make all compatible changes in BADI implementation and activate it. Now i am testing using transaction UJKT using following script.
    and the result is records successfully written back to application MIS, but when i check data is not moved to target application MIS.
    I am facing stuck situation in my project work. Please Suggest. Hope for positive reply.
    Script:
    *XDIM_MEMBERSET WM_ACCOUNT = WM_041,
    *XDIM_MEMBERSET WM_UOM_02 = UOM_004
    *XDIM_MEMBERSET WM_UD_2 = WM_07
    *XDIM_MEMBERSET WD_EXT_MAT_GRP =CHALK-PH-I,CHALK-PH-II,CHAVN-PH-I,CHAVN-PH-II,NASHIK-WM,RAJASTHAN-WM,TAMILNADU-WM
    *XDIM_MEMBERSET CATEGORY= Plan
    *XDIM_MEMBERSET AUDITTRAIL=Input
    *XDIM_MEMBERSET P_ENTITY = SIL
    *XDIM_MEMBERSET RPTCURRENCY = LC
    *START_BADI DAPP
       DESTINATION_APP ="MIS"
       RENAME_DIM ="WD_EXT_MAT_GRP= PRODUCT"
       ADD_DIM ="PLANT=NO_PLANT","MIS_ACCOUNTS=CAIN0058040008","COST_CENTER=NO_COST_CENTER","FLOW=Opening","UOM=AMT","CUSTOMER_SALES_2=NO_CUSTOMER","CATEGORY=Plan","AUDITTRAIL=Input"             
       DEBUG = ON
       WRITE = OFF
       QUERY = ON
    *END_BADI
    Please find attached result.
    Regards,
    Dipesh Mudras.

    Hello,
    Here is the manual to copy data between apps (it works with BPC NW75):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0480970-894f-2d10-f9a5-d4b1160be203?quicklink=index&overridelayout=true
    It works me, but now I need to modify the Script Logic to make that a "property" from the origin dimension has to be copied to the destination dimension as "id", like follow:
    //*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%
    //*XDIM_MEMBERSET TIME = %TIME_SET%
    //*XDIM_MEMBERSET ENTITY = %ENTITY_SET%
    //*XDIM_MEMBERSET RPTCURRENCY =  %RPTCURRENCY_SET%
    *START_BADI FiltroPD
         WRITE = OFF
         APPL = $APPLICATION$
         ADD_DIM = "ORIGEN = APPVENTAS"
         ADD_DIM ="O_COSTE = no_input"
         ADD_DIM="CECO = no_input"
         RENAME_DIM="P_ACCT = RATIOS.P_ACCT "
    *END_BADI

Maybe you are looking for

  • Need to replace the screen on my ipad and ipod, how to do without having to pay a fortune?

    Do not refuse to pay, but pay practically the value of another product, and all the expenses with displacement, because in my state do not have a service that does this serviço.isso I do not accept. here is my outrage and disappointment. Another alte

  • DMS - Document Management

    Dear all, According to de Help, Using the status management functions, you can determine that a project folder (or a object link) is only released when all the documents in the folder (for example, drawings, documentation) are released. I suppose tha

  • Error in creating company code

    Hi, When creating my client's company code, I am getting error message stating that "Communication error with external tax system(VERTEX_MS0018), Message no.TAX_TXJCD864 Pl. give me clue that where I did wrong and what could be the reason for error.

  • Why can't i get iWork for free on my new MBPro

    I recently purchased a new 13" MB Pro and tranfer3ed all my dta from my old MB Pro. However it seems i cant get the new versions Pages, Numbers and Keynote from the Appm store. I mnaged to egt ILife all upgraded without any issues.

  • Read comlumn from text file

    i have a text file of record some thing like last name first name email how can i make it read the text file column by column i created a class with linkedlist to put it in but can't make it recognize which is which (code) public void NewTail( String