JLayeredPane problem:  How to remove object added at specific depth in

JLayeredPane?
For instance, I have a class called BlobEvolution. In that class, I have an array of JLayeredPanes squrares[row][col][depth]. I add an object Blob, to a new LayeredPane cell, using the statement LayeredPane cell=new LayeredPaine();
cell.add(Blob, new Integer(2));, then I add the cell to a contentPane using contentPane.add(cell). I set squares[row][col][0] to point to cell, and squares[row][col][2] refers to the blob object in the cell.
but now I want to remove a certain layer from the cell and repaint that cell to display only the deeper contents of the cell. Or I want to remove the blob in the cell, which is always at depth 2 in the cell. How would I do that? And how do I repaint only that cell?

By the way, both objects that I add to the layeredpanes extend JLayeredPanes.
I actually tried to do this remove call: squares[row][col][0].remove(2);
I was trying to point to the cell layeredpane that contains the two objects, blob, and plankton. blob was placed at depth 2, so I tried to remove the depth 2 component. but I get an ArrayIndexOutofBounds Exception and it says no such child:2. java.awt.Container.getComponent(Container.java:237)
javax.swing.JLayeredPane.remove(JLayeredPane.java:216)
BlobEvolution.removeblob(BlobEvolutioin.java:133)
That's essentially the error message I get in the console. Obviously, it's the remove statement above that's giving me the problem, but I don't know what's wrong with it and how to fix it.
Please, if anyone can help I'd really appreciate it.

Similar Messages

  • How to remove objects

    PLEASE How to remove objects from sidebar?
    Can draw folders and files etc in sidebar, but not remove the representation n sidebar. Pulled out objects returns back immediately.
    ~~~~~ k.

    You should be able to drag it off and "Poof" it. Have you released your mouse button?
    If it's one of the standard items in Sidebar you might go to Finder > Preferences > Sidebar > and uncheck them.
    -mj

  • How to remove objects from pics using LR...

    I am not a professional photographer and I do not have a whole lot of photo editing knowledge. I started out several years ago using Photoshop elements 5 and eventually learned how to do several things like moving objects around or removing them from a photo, or moving someone's face into a different picture if their eyes were closed and lots of nice editing features. I loved it and still love it. My laptop was getting really old and slow so I just recently purchased a new computer which has windows 8 on it. I loaded my photoshop elements and cannot get it to open or work properly and am wondering if it's because of the windows 8 operating system. So I then decided to purchase a new photo editing software. I decided (quickly.. too quickly) to purchase adobe lightroom just because it had very good reviews online. Now I have several pictures that need to be edited for Christmas and I cannot find any "lasso tool" or any thing similar right now.. I was so used to using the layers and features from the PE and now my heart is broken because I feel so lost and maybe broke at the same time!! This program is soooo different than what I was used to using but I don't even know if I can do the same things with it. EXAMPLE: there is an air conditioner unit in one of the photos I've taken and I was planning on removing it from the picture. Also I was aiming on moving a face over from another picture because of some closed eyes.. Someone please tell me, is this program capable of doing these things or can I only play with the lighting in this? Will I have to spend more of my $$ to get another Photoshop elements to get the features I use?

    These tasks are tasks for Photoshop or Photoshop Elements, not for Lightroom, which is more an image data base.

  • How to remove faces added on Facebook?

    Hello there,
    I'll try to describe my problem as precisely as possible.
    I have recently noticed that, after posting pictures on Facebook through iPhoto and then identifying some persons over there, their names do show up on my iPhone Photo App as separate entities!? ... although they do not appear at all in iPhoto on my Mac.
    So basically my question is: how can I remove/delete these persons/tags that I identified when once using Facebook (that I don't use anymore - account deleted) from the native iPhoto application? Obviously it kept this information somewhere in an hidden spot
    Thanks in advance for your help.

    Apparently, I found out myself, by going back on the pictures involved, taking the "naming" command and deleting the frame around the persons in question ...
    Not very intuitive but it worked apparently.

  • How to remove objects cached in data cache?

    With following query, I can find out how the  table cached in data cache with the indexes: 
    Select CacheName,DBName,OwnerName,ObjectName,IndexID,sum(CachedKB) as "CachedKb"
    from master..monCachedObject
    where ObjectName = 'invent'
    group by CacheName,DBName,OwnerName,ObjectName,IndexID
    order by CacheName,DBName,OwnerName,ObjectName,IndexID
    Is it possible to remove the cached data for particular index from data cache? I want to verify the performance issue is on particular index and reproduce the performance issue.

    SImply unbind the objects from their named cache.  Then, bind the objects again back to their named cache.  The "re-bind" step doesn't have to be done if we are talking about "default data cache".
    For objects bound to named cache other than "default data cache":
    exec sp_unbindcache <dbname>,<tablename>,<indexname>
    exec sp_bindcache <cachename>,<dbname>,<tablename>,<indexname>
    Now data will be read from disk on first retreival.
    For "default data cache" objects:
    exec sp_unbindcache <dbname>,<tablename>,<indexname>

  • Carrier return problem, how to remove CR

    Hi, I just created a BSP page that should upload a CSV file in its original state to the application server.
    for example, there are 3 columns in my original .CSV file separated with ; ->
    12412,22;2342,32;1000,40
    1000,32;3444,31;4500,11
    right now, it is uploaded in the following format instead of the one above
    12412,22;2342,32;1000,40#
    1000,32;3444,31;4500,11#
    The problem is, that when I use this file from the application server, it gives errors on the last fields, because it thinkgs it should take 1000,40# instead of 1000,40 as an amount.
    This problem would be solved, if data was loaded without adding the # after every row.
    Data is loaded from my pc to the application server using a BSP with the following code:
    write file to server
    fname = '/usr/sap/CBD/DVEBMGS03/data/RU_BRA_PRO.CSV'.
    OPEN DATASET fname FOR OUTPUT in BINARY MODE.
    if sy-subrc gt 0.
    WRITE: / 'Error opening file'.
    endif.
    TRANSFER file TO FNAME.
    CLOSE DATASET FNAME.
    What do I have to do (sorry, ABAP&BSP newbie) to upload the file in its original state, to avoid the # being added...
    thanks

    Thanks to Eddy, this issue has been solved. The solution, when writing in TEXT MODE, was to define the input file as type STRING and reading it using get_Cdata instead of get_data.
    here is the full code, so that people that are not programming guru's can get something out of this too! Eddy, thanks a 1000 !
        data: entity         type ref to if_http_entity,
              file           type string,
              content_type   type string,
          content_length        type string,
              num_multiparts type i,
              i              type i value 1,
              doEcho         type string,
              value          type string.
      find multipart containing file
        num_multiparts = request->num_multiparts( ).
        while i <= num_multiparts.
          entity = request->get_multipart( i ).
          value = entity->get_header_field( '~content_filename' ).
          if not value is initial.
          found a file!
            navigation->set_parameter( name  = 'content_filename'
                                       value = value ).
            content_type = entity->get_header_field( 'Content-Type' ).
            navigation->set_parameter( name  = 'content_type'
                value = content_type ).
          get file content
            file = entity->get_cdata( ).
          get file size
           content_length = xstrlen( file ).
            navigation->set_parameter( name  = 'content_length'
                value = content_length ).
    data: data_TAB type table of string, LIN TYPE LINE,fname type string.
    split file at CL_ABAP_CHAR_UTILITIES=>CR_LF into table data_TAB.
    fname = '/usr/sap/CBD/DVEBMGS03/data/FILENAME.CSV'.
    OPEN DATASET fname FOR OUTPUT in TEXT MODE encoding default.
    if sy-subrc gt 0.
    WRITE: / 'Error opening file'.
    endif.
    LOOP AT data_TAB INTO LIN.
    TRANSFER LIN TO FNAME.
    ENDLOOP.
    CLOSE DATASET FNAME.

  • How to remove music added to the frame

    I have added music (in loop) to the first frame of main timeline (through property panel), So it keeps playing till the last frame, but when the control jumps to first frame again after finishing all frames there are two musics playing, How can that be stopped?

    You don't have a lot of control if you dragged the sound to the stage and then set it to loop in the properties panel. You can either jump back to frame 2, so you don't play the sound at frame 1 when you loop the timeline or you can control the sound yourself using AS. Here's a little sample you could place in frame 1 that loops the sound 'libSound' 999 times, and only plays one time by using a flag variable:
    var a:Sound;
    var c:SoundChannel;
    var isPlaying:Boolean;
    if(!isPlaying){
        isPlaying = true;
        playSound();
    function playSound()
        a = new libSound(); //sound from library
        c = new SoundChannel();
        c = a.play(0,999);   

  • How to Remove Computer Added Mysteriously and Without NMagic!

    Don't know how but on my NMagic map there is now a mysterious new computer which I didn't add.  I can't figure out how to get rid of it since it also says I need to install NMagic on that mysterious computer.  If I install it on that computer which is non-existent, then I'll really be installing it twice on my desktop (which, yes, is already in the network map).  Does anyone know how to get rid of a ghost computer which has showed up in my NM map?   Geesh!!! Email at [email protected] if you can help.  Thanks!

    Solved my problem. I made all the changes suggested by mbroadfo  in the query "Network Map Issues Solved" and it fixed my problem
    Theron...

  • How do you remove previously added computers?

    Just a little while ago, I noticed some unknown device appeared on my "Computers" box on the "My Network" menu. I don't know the origin of this device, but I would like to remove it from my wireless network as soon as possible (especially if it's from an outside source). However, I couldn't find anything telling me how to remove previously added computers/devices.
    Oh, and if this device is from an outside source (e.i. hacker), I just activated my router's security settings as a precaution.

    I had the same problem--an unknown computer suddenly showed up on my secured network and I was notified. I changed my encription but that computer is still listed. Is changing the encryption good enough? It makes me nervous to see that computer sitting there without knowing where it came from and whether it is actually able to access my network.

  • How to remove the Sessions used in the application

    Hai Techies,,,
    i am using many number of sessions in my application, for example i am using 5 sessions in reports module
    my application is a web based application
    if can't remove the sessions it contains the huge amount of data , my application is going into mess, and the application performance will be decreased..
    Can anybody tell the solution for this Problem
    How to remove the Sessions used in the application
    Hoping a reply
    Thanks & Regards
    Krishna mangamuri

    Hai Gita,
    i am not able to do the session invalidate method bcoz, i am mainatainting the session from login along with the current userid who is login into the system and putting some of the data in session....
    thats session is to be valid upto when i click on logoff link
    except that i have to remove the sessions in my application
    while navigating from one jsp to another i have to remove the sessions, bit somes times that sessions may be used somewhere
    Can u Understand My problem
    session remove method may also helpful to me but some times it will casue some prob to me
    Is there any other Way to remove the sessions in the Application ????
    Thanks & Regards
    Krishna Mangamuri

  • How to remove special characters while typing data in edit cell in datagrid in flex4

    Hi Friends,
    I am facing this problem "how to remove special characters while typing data in edit cell in datagrid in flex4".If know anyone please help in this
    Thanks,
    Anderson.

    Removes any characters from
    @myString that do not meet the
    provided criteria.
    CREATE FUNCTION dbo.GetCharacters(@myString varchar(500), @validChars varchar(100))
    RETURNS varchar(500) AS
    BEGIN
    While @myString like '%[^' + @validChars + ']%'
    Select @myString = replace(@myString,substring(@myString,patindex('%[^' + @validChars + ']%',@myString),1),'')
    Return @myString
    END
    Go
    Declare @testStr varchar(1000),
    @i int
    Set @i = 1
    while @i < 255
    Select
    @TestStr = isnull(@TestStr,'') + isnull(char(@i),''),
    @i = @i + 1
    Select @TestStr
    Select dbo.GetCharacters(@TestStr,'a-z')
    Select dbo.GetCharacters(@TestStr,'0-9')
    Select dbo.GetCharacters(@TestStr,'0-9a-z')
    Select dbo.GetCharacters(@TestStr,'02468bferlki')
    perfect soluction

  • After upgradataion ,In testing phase- after search ,in result view we are getting some unwanted data ' +++++" should be added in Name .how to remove it.can you please help.

    Hi Team,
    After upgradataion ,In testing phase- after search ,in result view we are getting some unwanted data ' +++++" should be added in Name .how to remove it.can you please help.
    I want to remove ++++ in that column.

    Hi Kalpana,
    Please provide additional information for community users to relate this issue. Info like versions (old & new), the object which has this problem or component/view name will be useful to get the answers.
    Regards,
    Shobhit

  • How to remove the space in the info object level?

    Hi,
    I created a Master Data info Object and gave the data type as <b>Char</b> and length as <b>30</b>.
    From the source system I am getting the data of length 9. But at PSA level I am getting some erroneous records.
    Example: Data from the source system  'a12345678'
                   Data in PSA 'a12345678b'     -
    ***  where b  - Blank
    With out changing the length how can I remove the spaces (Blank)?
    Can any one suggest me how to remove, where and what to apply ?
    I need to do any settings at the info object level or at the Transfer Rule?
    Please provide the each and every step to resolve my problem.
    Thank you

    Hey  you can allow space in RSKC tcode and execute it... .that's it .
    and below is the routine for invalid chars and you can have this in update rules ..
    data: w_fielda(x) type c.
    data: w_result(x) type c.
    data: w_temp_field(1) type c.
    data: w_count type i.
    w_fielda = COMM_STRUCTURE-/BIC/Zxxxxxx.
    w_count = 0.
    do x times.
    clear w_temp_field.
    w_temp_field = w_fielda+w_count(1).
    if w_temp_field CA
    '!"%&''()*+,-./:;<=>? _0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
    w_result+w_count(1) = w_temp_field.
    endif.
    w_count = w_count + 1.
    enddo.

  • How to remove Collected objects in BI system?

    Hi all,
    I am a new user of SAP BI, from the above steps I came to know how to activate remotely the Data sources. My concern is, accidently I have collected the Infoobjects from PHD source system, the system prompted me to check my authoriztion, I chose don't check. I didn't had a clear idea about how this works, the system started creating D versions of selected Infoobjects. I dont want to INSTALL those Infoobjects in BI content. I havn't done INSTALL step.
    Can someone guide me on how to remove those selected infoobjects completely from BI content ? Incase if its not possible to remove, if those objects are left as it is... what kind of problem it might cause further?
    Thanks
    Jeeth

    Hi
    If you ahve not installed these, you can simply remove these collection by draging the objects to the left hand side panel.
    Cheers
    Chanda

  • Hello! The question is this. In London, took the Iphone 5 as sim free, flew to Moscow put Simcoe, and he writes me that is locked to the operator O2. Can anyone encountered this problem? What to do? How to remove the Unlock?

    Hello! The question is this. In London, took the Iphone 5 as sim free, flew to Moscow put Simcoe, and he writes me that is locked to the operator O2. Can anyone encountered this problem? What to do? How to remove the Unlock?
    <Edited by Host>

    Look at your receipt. Does it say unlocked? It is possible to purchase both locked "sim free" and unlocked iPhones from Apple.
    ONLY the carrier an iPhone is locked to can legitimately unlock it.
    IF your receipt says that it was supposed to be unlocked, and it is not, call AppleCare. They should be able to straighten it out.

Maybe you are looking for