Bizarre Problem for table row deletion.please help

Folks
I am facing a most BIZARRE PROBLEM!!!
I have a table with a deleteButton by the side.
The table has 3 rows
ABC-----DELETE
BCD-----DELETE
VDG-----DELETE
I click on the delete Button of the first row,the record gets deleted from the table,
Now there are 2 records..
BCD-----DELETE
VDG--- -DELETE
I click on the delete Button of the first row,and I get the error
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
The table.getSelectedRow() becomes -1 automatically...
Now if I comment out the Table deletion statements, and I click on any delete Button
i get the correct messages
You clicked row : 1
you clicked row : 2
After deletion of the first record,i am unable to delete the 2nd record,i get the
error above.
any suggestions
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Table Row clicked is : " + table.getSelectedRow());
// Delete row from window.
((DefaultTableModel)table.getModel()).removeRow(table.getSelectedRow());
table.revalidate();
};

after deleting the row call this method
fireTableRowsDeleted()
-Ashish

Similar Messages

  • Adapter problems for late 2009 Macbook - Please help!

    I have a late 2009 white Macbook that I want to hook to an older TV. I bought the mini-dvi to s-video adapter on advice on the apple support people. The adapter showed up and the mini-dvi plug is much bigger than the dvi plug on my macbook. I did the live chat (live in North Dakota, not a lot of genius bars around here...) and the guy ran my serial number and insisted this was the correct adapter- several times. I'm not crazy! The thing doesn't fit.
    Can someone please help me figure this out?

    Check out this list. The 2009 MacBook is not compatible with that adapter if I am reading the table correctly.
    http://support.apple.com/kb/HT3235

  • I have not been able to update my fairy farm game for the last 5days as it quit at launch. I am afraid to delete and reinstall the game as i might lose all. Anyone knows if there is an update for this game? Please help. Thanks

    I have not been able to update my fairy farm game for the last 5days as it quit at launch. I am afraid to delete and reinstall the game as i might lose all. Anyone knows if there is an update for this game? Please help. Thanks

    Erdygirl please be aware you are posting to a public forum.  I have removed your personal information from your previous post.
    Please check your account at http://www.adobe.com/ to locate your serial number.  You can find more information on how to locate your serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • I have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me

         i have a really really big problem to my iphone icloud please help me i could send you my birth certificate for confirmation that im the real user please help me apple.corp and please tell me if this is not possible to be done it almost a month that i cant use my iphone.
         thank you for those who read this
    <Email Edited by Host>

    Remove your email address.  This is a public website, and you are addressing thousands of strangers.
    After doing that, tell us what your issue actually is.  This is a user-to-user technical forum.  You are not addressing Apple here.

  • Is there any link between oe_order_headers_all and hz_cust_accounts tables. I need to find the cust_account_id for some order_number. Please help me with this

    Is there any link between oe_order_headers_all and hz_cust_accounts tables. I need to find the cust_account_id for some order_number. Please help me with this

    you can link
    OOH.invoice_to_org_id=CUST.cust_account_id   -- invoice customer
    OOH.sold_to_org_id=CUST.cust_account_id   -- sold to customer
    OOH.ship_to_org_id=CUST.cust_account_id   -- ship to customer

  • BDC - table control - experts please help

    Hi experts,
    Please help. I am in need of your help.
    I am working with BDC and I have a table control in one of the screen. Table control has a check box in the first column. While recording how I entered the data is : I select the check box in a row, enter two values in next two columns of that row and then hit enter then the other columns in that row turn from grey to white (initially these columns are greyed out).
    NOw in BDC when I run my session in foreground, I am able to check(select) the check box and enter the values in next two columns and then I have a Enter OKCODE. But when I hit enter it is not able to recognize the row and its unable to turn the greyed out columns in that particular row to white.
    Is there a way to specify in my program that I am hitting enter in one particular row.
    Please help. Let me know if something is not clear. Very urgent . Pleasee respond. Thanks

    Hi Rich,
    Thanks for the replies. I will try that. I got one more doubt. While manually creating the recipes using C201, there is a screen Recipe header. When I record this transaction, I see a different screen for the Recipe header. Fro example the screen numbers are like 4210(manual) and 4211(recording).
    But my problem is there are two fields which are missing in the screen which I am getting while recording C201. These two fields are present on the screen for manual creation. I need to enter those two fields while I record. But how can I do this.
    Please help.

  • My iTunes won't open! It keeps saying 'The iTunes Library.itl is locked on a locked disk or you not have write permission for this file.' Please Help!

    My iTunes won't open! It keeps saying 'The iTunes Library.itl is locked on a locked disk or you not have write permission for this file.' Please Help!

    this may happen on external drives if:
    The external drive was hotpluged (removed) without going the correct "eject" way
    The iTunes library (database) got corrupted
    First Aid for external drive
    Close iTunes
    Unmount (eject) external drive the right way.
    Mount drive again
    Go to Workplace -> right click external drive -> choose "clean up" This will force the filesystem to rescan the file structure of the drive and rebuilding the file system table and journaling file.
    After the tool shows "done" (could last some time depending on size of drive) restart iTunes
    If your iTunes library is on your internal drive, this may happen
    The system was not shoot down correct, e.g. "pulled the plug"
    The iTunes library (database) got corrupted
    First Aid for internal hard drive
    Close iTunes
    Reboot system
    Go to Workplace -> right click external drive -> choose "clean up"
    After the tool shows "done" (could last some time depending on size of drive)
    Reboot system, restart iTunes
    If none of the above fixes your problem, post here.
    Lupunus

  • HI YANN/VADIM...Still having problem in BADIs...please help me out

    Hi Yann/Vadim,
    Facing a problem in BADI can u please help me out...
    I am implementing sourcing dashboard.
    I am facing problem while implementing the badi BBP_ECS_PO_OUT_BADI in SRM. and BBP_PO_INBOUND_BADI in R3.
    i have written following code in BBP_ECS_PO_OUT_BADI in SRM
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    data : ls_item type BBP_PDS_PO_ITEM_D.
    data : w_customer_fields type BBPS_IF_CUSTOMER_FIELDS_PI.
    move 'POITEM' to w_customer_fields-refobject.
    move 'CATALOGID' to w_customer_fields-fieldname.
    move ls_item-catalogid to w_customer_fields-container.
    append w_customer_fields to ct_bapi_customer_fields.
    endmethod.
    i have created field zsrmcatalogid field in R3 in EKPO table.and i am now implementing the Badi in R3 for BBP_PO_INBOUND_BADI .....in extended classic scenario.
    i have written following code in R3 BADI
    method IF_EX_BBP_PO_INBOUND_BADI~BBP_MAP_BEFORE_BAPI.
    data : wa_customer_fields type bbps_if_customer_fields,
    wa_bapi_te_mepoitem type bapi_te_mepoitem,
    wa_bapi_te_mepoitemx type bapi_te_mepoitemx,
    wa_extensionin type bapiparex.
    data : txt_960(960) type c.
    read table bbp_customer_fields into wa_customer_fields with key
    refobject = 'POITEM' fieldname = 'CATALOGID'.
    if sy-subrc eq 0.
    move wa_customer_fields-container TO
    wa_bapi_te_mepoitem-zsrmcatalogid.
    wa_bapi_te_mepoitemx-zsrmcatalogid = 'X'.
    endif.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitem to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    clear txt_960.
    clear wa_extensionin.
    write wa_bapi_te_mepoitemx to txt_960 left-justified.
    wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.
    wa_extensionin-valuepart1 = txt_960(240).
    wa_extensionin-valuepart2 = txt_960+240(240).
    wa_extensionin-valuepart3 = txt_960+480(240).
    wa_extensionin-valuepart4 = txt_960+720(240).
    append wa_extensionin to bapi_extensionin.
    endmethod.
    But its not working...
    The PO details are not passed from SRM to R3.......
    PLEASE CAN U GIVE ME EXACT CODE FOR CHANGES TO BE MADE IN THIS BADI ..AS IT IS NOT WORKING...
    Can anybody help me regarding how to debug the BADI in R3.
    Thanks in Advance...

    Hi Ravi,
    You can transfer the standard SRM catalog ID field to R/3 tracking number field (if not already used for another purpose) in the R/3 PO.
    This will avoid to implement the R/3 inbound bapi.
    Here is an extract of the code.
    The ECS PO badi example was here used to transfer the unlimited delivery flag to R/3 PO for a Z combination of criteria as well as the transfer of <b>catalog ID</b> to <b>tracking number field</b> in R/3 PO :
    method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.
    update unlimited delivery flag in R3 PO for combination of vendor +
    Product Category maintained in the bespoke table ZUD_PC_VNDR ..
      LOOP AT ct_bapi_poitem INTO ls_bapi_poitem.
        lv_tabix = sy-tabix.
        IF ls_bapi_poitem-po_item IS NOT INITIAL.
          READ TABLE it_item INTO ls_item
               WITH KEY number_int = ls_bapi_poitem-po_item
                          del_ind    = ' '.
          IF sy-subrc = 0.
    Set Unlimited delivery Flag
            read table li_zud_pc_vndr into ls_zud_pc_vndr
                            with key partner       = ls_partner-PARTNER_ID
                                       category_id = ls_item-category_id.
            if sy-subrc eq 0.
              ls_bapi_poitem-UNLIMITED_DLV = 'X'.
            endif.
    Set the Dummy catalog.. entry..
            if ls_item-catalogid eq c_dummy.
              ls_bapi_poitem-TRACKINGNO = c_noncat.
            endif.
            ls_bapi_poitem-GR_BASEDIV = ' '.
            modify ct_bapi_poitem from ls_bapi_poitem index lv_tabix
                          transporting UNLIMITED_DLV TRACKINGNO GR_BASEDIV.
          ENDIF. "READ TABLE it_item ..
        ENDIF.   "IF ls_bapi_poitem-po_item ..
      ENDLOOP.   "LOOP AT ct_bapi_poitem ..
    endmethod.
    Kind regards,
    Yann
    PS : please do reward helpful answers ))

  • FORALL bulk delete statement requires lot of time even for 10 rows deletion

    Hi,
    when I execute FORALL bulk delete statement it requires lot of time even for 10 rows deletion.so how to avoid this problem? I checked SGA_TARGET and PGA_TARGET cureent_size and max_size are same for both. Is their memory problem?
    I execute following code
    DECLARE
    TYPE t_id_tab IS TABLE OF test.c1%TYPE;
    l_id_tab t_id_tab := t_id_tab();
    Begin
    select c1 bulk collect into l_id_tab from TEST where c1<=10;
    dbms_output.put_line(DBMS_UTILITY.get_time);
    FORALL i IN l_id_tab.first .. l_id_tab.last
    delete from TEST where c1= l_id_tab(i);
    dbms_output.put_line(DBMS_UTILITY.get_time);
    commit;
    End;
    thanks in advance
    Vaibhav
    Edited by: Vaibhav on Oct 10, 2011 10:47 PM

    hi
    i am working on oracle 11g. Actually i have to test which is the faster method to delete 150000 records.
    1st by using FOR Loop bunch of 10000 records
    2nd by using FORALL delete
    kindly find below FORALL delete code
    DECLARE
    TYPE t_id_tab IS TABLE OF test.c1%TYPE;
    l_id_tab t_id_tab := t_id_tab();
    Begin
    select c1 bulk collect into l_id_tab from TEST where c1<=10;
    dbms_output.put_line(DBMS_UTILITY.get_time);
    FORALL i IN l_id_tab.first .. l_id_tab.last
    delete from TEST where c1= l_id_tab(i);
    dbms_output.put_line(DBMS_UTILITY.get_time);
    commit;
    End;
    Edited by: Vaibhav on Oct 10, 2011 10:56 PM

  • TS1363 My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue?

    My iPod Nano 7th Generation couldn't be detected by iTunes when I plugged in. I tried resolving the issue by uninstalling the iTunes and then install it back again but yet still the same problem exist. Can you please help me to solve this issue? I have already updated to the latest version of iTunes on my Windows 8 and I cannot synchronize my iPod for the time being. Please do help me to solve this problem. Thank You.

    uninstall all iTunes,5 programes,this worked for me after reinstall them

  • After updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid

    after updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid good money for this mack, I feel calm

    Hi Buterem,
    I'm sorry to hear you are having issues with your MacBook Pro since your recent Yosemite update. I also apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having intermittent but persistent responsiveness issues with your mouse or trackpad, you may want to try using Activity Monitor to see if these incidents correspond to occupied system resources, especially system memory or CPU. You may find the following article helpful:
    How to use Activity Monitor - Apple Support
    If the entire system hangs or locks up (for example, if the system clock freezes and stops counting up), you may also be experiencing some variety of Kernel Panic. If that is the case, you may also find this article useful:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Regards,
    - Brenden

  • I upgraded to iOS 7 yesterday on my iphone and now none of my apps shows me any new message and when i open the apps it says "Connect to itunes for push notifications". Please help!!!

    I upgraded to iOS 7 yesterday on my iphone and now none of my apps shows me any new message and when i open the apps it says "Connect to itunes for push notifications". Please help!!!

    Same here.  I don't know how to solve the problem, but I figured out a way to close the app without re-starting or resetting the phone.  If you click ok and then press the home button twice really fast before the dialog box shows back up, you can put the phone in multi-tasking mode and close the app without having the shut the phone off or reset it.  Anxiously awaiting the fix for this since I have several apps I use that I can access at the moment.

  • Firefox is having problems with "Southwest Airlines website" Please help soon

    Whenever I go on Southwest Airline website, it does not work. I am having this problem since last month. Please help on this as soon as you can.

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Other things that need your attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    * Shockwave Flash 10.0 r22
    * Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://kb.mozillazine.org/Flash
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://kb.mozillazine.org/Java
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • My music on my iphone 5 is messed up. The pictures for the song album are on the wrong songs like the cover for drop it like its hot is on the cover for dark horse! Please help

    My music on my iphone 5 is messed up. The pictures for the song album are on the wrong songs like the cover for drop it like its hot is on the cover for dark horse! Please help!!!

    Hello TheGyzmo,
    Thanks for using Apple Support Communities.
    It looks like your might have signed up for iTunes Match.
    Good to know
    When you enable iTunes Match on your iOS device, the music library on your iOS device will be deleted and replaced with your music in iCloud.
    Syncing music with iTunes will be disabled while iTunes Match is enabled on your iOS device.
    By default, when you add an iOS device to iTunes Match, the option to download over a cellular network isn't enabled1. To enable downloading over a cellular network for iTunes Match, choose Settings > iTunes & App Stores > Use Cellular Data > On.
    When you use iTunes Match on an iPhone, iPad, iPod touch, Mac, or PC, it will be associated with the Apple ID you use for iTunes Match. Learn more about subscribing to iTunes Match.
    iTunes Match on iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT5637
    What I suggest is that you move your music from your old laptop to your new one by following the steps below:
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT4527
    After that, you can then add iTunes match on your computer, or turn off iTunes Match on your iPhone, and then sync your iPhone as you would normally with your new computer.
    iTunes: How to add a computer or iOS device to iTunes Match
    http://support.apple.com/kb/ht4913
    Take care,
    Alex H.

  • HT201412 My iPod 2G doesn't turn on. It is out of battery, but when I connect it to my charger it just continues to show the apple logo. It did that for 3hours straight. Please HELP!

    My iPod 2G doesn't turn on. It is out of battery, but when I connect it to my charger it just continues to show the apple logo. It did that for 3hours straight. Please HELP!

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

Maybe you are looking for

  • Premiere Elements  12 wont run on my laptop

    Hi, I have a new laptop and I've just installed  Premiere Elements 12 but it wont run. When I create a new project I see the following message and as you can see there are no clues to what causing the issue. Organiser works fine. I've run a windows u

  • Can't start xfdesktop[solved]

    i have installed xfce4 and xfce4-goodies,follow this wiki http://wiki.archlinux.org/index.php/Xfce, I choose xfce session in login screen,only black screen with two panels,no wallpaper,no icons... the xfdesktop doesn't start automatic,then i want to

  • "iPhoto unexpectedly quit while trying to restore its windows"

    When I try to open iPhoto, it says "iPhoto unexpectedly quit while trying to restore its windows," then gives me the option of restoring the windows or not. Whatever one I click, iPhoto opens for a second and displays a blank gray screen, then quickl

  • IndentAndSpacingFormat - Bug in API or am I doing something wrong?

    I have a FieldObject in my report with double line spacing (LineSpacing=2) and then try following code to see its spacing format: double lineSpacing = myFieldObject.FieldFormat.StringFormat.IndentAndSpacingFormat.LineSpacing; Unfortunately this retur

  • Cannot re-install Acrobat9 after trial to DC

    Acrobat9 Standard was installed on my computer. I tried a trial version of DC which uninstalled Acrobst9. I do not want the DC version and tried to re-install Acrobat9. I have the serial number. The version was an upgrade from Acrobat 6&7. I no longe