Programmatically pick a cell from a table

Hello
Programming in XCode.
I have a table in view.
I have a shake detection implemented.
Now I want that, as you shake the device, a random cell is picked from the table as the new one that is selected.
I have a random number for the row generization which doesn't exceed the list count.
Now I want to execute something to pick, to highlight the randomly generated row of choice.
I hav no idea what command or call to use.
Please help!
Kind Regards,
Jan

This does the job of setting an indexpath right. (randomrij is randomrow, eentabelview is atableview)
NSIndexPath *scrollIndexPath = [NSIndexPath indexPathForRow:randomRijinSection:0];
[[self eenTabelView] scrollToRowAtIndexPath:scrollIndexPathatScrollPosition:UITableViewScrollPositionNone animated:NO];
Still nothing changes in the view, the row isn't made active.
Should there be extra code to make it happen or is there something wrong with these two lines of code given here.
For example, do there exist multiple NSindexPaths and did I set some virtual IndexPath to the random row.

Similar Messages

  • How to dynamically copy cells from different tables?

    Hi,
    I've created an invoice and have 2 different tables. First is at top with Recipient information, the invoice number, their address, etc. Below that, I have a 2nd table laying out the items they are being charged for.
    I would like to copy the invoice number from the 1st table, to a cell in the 2nd table or a 3rd table I will create later on. I know how to copy cells in 1 table, ie. =D4. But not sure how to target a different table altogether.
    Also, is it possible to copy a cell from 1 table to a text box field?
    Thanks!!

    Yvan's point is true.  Please use the User Guides first; they're actually pretty readable.
    However, there's a very quick & easy way to try it out as well.  Go to the cell where you want your data to end up.  Type "=" (without quotes) to indicate you're going to input a formula of some kind.  Then without clicking inside any tables, use the list of sheets and tables to the left to get to your source table and click on the cell that contains the data you want to copy.  Presto!  Go back to your destination cell, and the formula is now filled in, following the scheme Yvan provided.
    Vince

  • Can VLOOKUP, OFFSET, INDEX and MATCH be used to SUM the value of cells from multiple tables?

    I have a problem thats needs a sulution. I have a Spreadsheet with multiple sheets and tables. The (Truck ) Sheets each represent a "Site" and the tables within from 1-31 show inventory counts for each day of the month.
    Shown below are Edited example's of a "Site" sheet and the Day tables contained within it.
    The Spreadsheet expands as a new "Site" (Truck ) is added regularly. Currently there are 30 "Sites" (Trucks).
    Also within the spreadsheet is a sheet (Checkpoint) which contains tables used to show summary data for each "Site" sheet. There is one table used to review one site, so currently there are 30 tables identical in format and structure reviewing 30 sites.
    An edited example of the summary table for Truck 1 is shown below.
    The table's in CP reference data within cells from other sheets. A LEN INDIRECT formula
    =IF(LEN(INDIRECT("Truck 1::Day "&COLUMN(cell)−3&"::K53",addr-style))<1,"",INDIRECT("Truck 1::Day "&COLUMN(cell)−3&"::k53",addr-style))
    was used to retrieve the values within certain cells. This formula works perfectly because when I add another "Site" I simply need to Dupicate a "Site" Template Sheet and then Copy Paste the LEN INDIRECT formula in to the newly created Summary table. 
    There is another sheet (Command Central) which contains a Master summary table. The Master Summary sheet is identical in structure to the CP Summary Tables. Its purpose is to show the combined data from the tables within Checkpoint (Truck 1-30). for instance MS::D5=Checkpoint::Truck 1:Truck 30::D5. I realize that Numbers cannot calculate cells within a range of table so I am hoping for a workaround. 
    Could someone please help me with a formula something like the LEN INDIRECT formula mentioned above or possible a something else that could work beside
    D5=Truck 1::D5,Truck 2::D5,Truck 3::D5...?
    When I use that formula type I will have to edit the formula every time I add a new site.
    Anothe issue Im having is getting D3:AH3 to show the correct count of names. I am using the following formula:
    D3=SUM(COUNTA(Truck 1::D3,Truck 2::D3,Truck 3::D3,Truck 4::D3))−SUM(COUNT(UNION.RANGES(Truck 1::D3,Truck 2::D3,Truck 3::D3,Truck 4::D3)))
    The cells it is counting are either blank (the refenced cell contains a LEN INDIRECT formula that places "" if needed) or contain a name. This formula works when I and addressing cells without the LEN INDIRECT formula. What am I doing wrong?

    Hello Wayne,
    Here are screenshots of the tables in question. The first on is the Master summary table.
    Cell D5 shows the value pulled from Checkpoint::Truck 1::D5
    Cell E5 shows the value pulled from Checkpoint::Truck 2::D5
    Cell F5 shows the value pulled from Checkpoint::Truck 3::D5
    Cell G5 shows the value pulled from Checkpoint::Truck 4::D5

  • I want to reference a cell from another table and fill it with text

    I I have several tables that update each other with data from the previous one. These tables are identical and follow each other by date. In each table is a cell (B1) where a persons name goes. the cell (B2) references another cell from a previous dated table. Some days, consecutively, no name is entered in to cell B1. I want cell B2 to always refer back to the most recent table with a name is cell B1. How can this be done?
    I have written this formula (applied to cell B2 of this example) already: IF(Day 1::B1="","",IF(Day 1::B1≥"",Day 1::B1))  but it only references the previous days table and stops there. Some days nothing is inputed into cell B1 causing causing the following days table cell B2 to show "0".
    Monday, April 1
    Driver
    Driver for Today
    David
    Previous Driver (Last person to drive vehicle)
    Tuesday, April 2
    Driver
    Driver for Today
    Previous Driver (Last person to drive vehicle)
    David
    Wednesday, April 3
    Driver
    Driver for Today
    Mike
    Previous Driver (Last person to drive vehicle)
    David
    Thursday, April 4
    Driver
    Driver for Today
    Previous Driver (Last person to drive vehicle)
    Mike
    Friday, April 5
    Driver
    Driver for Today
    Previous Driver (Last person to drive vehicle)
    Mike
    Saturday, April 6
    Driver
    Driver for Today
    Carl
    Previous Driver (Last person to drive vehicle)
    Mike
    Sunday, April 7
    Driver
    Driver for Today
    David
    Previous Driver (Last person to drive vehicle)
    Carl

    "I am having trouble getting the formulas you suggested to work. I am not sure where the problem is coming from. Could you look at the following spreadsheet and tell me where I am going wrong? The following pic shows Day 1 and AUX tables. In Day 1 cell B1 a Drivers name is entered. As you can see by the formula that you gave the B2 is for "Product" not the drivers name "David"."
    Hi br,
    The formulas provided above apply directly to the set of tables shown with them. In each of these tables, the target cell, containing the name of the driver for that day is cell B2 on the table for that day.
    For Day 1, the driver is Huey, found in cell B2 of Table 1, and the cell reference to retrieve the information from that cell is =Table 1::B2
    The formula in B2 of Aux uses INDIRECT to build that cell reference from the fixed text string "Table ", the calculated value ROW()-1, and the text string "::B2"
    ROW() returns the number of the row in which the function sits. In B2, that's row 2, and ROW() returns 2. -1 subtracts 1 from that value, leaving 1. In B2, ROW()-1 returns 1.
    The ampersand is the concatenation operator. It joins the value before it to the value following it. The result is a text string. in the INDIRECT part of the formula, there are two & operators, one after "Table ", the other after ROW()-1.
    "Table " & ROW()-1 & "::B2" with the result of ROW()-1 as the value between the two text strings.
    "Table " & 1 & "::B2"   =   "Table 1::B2"
    INDIRECT( ) takes that text and converts it to the cell address that it represents.
    B2: =IF(LEN(INDIRECT("Table "&ROW()-1&"::B2"))<1,"",INDIRECT("Table "&ROW()-1&"::B2"))
    The first instance on the string in the formula is a test to see if there is anything in the target cell. If not, the formula returns a null string. If there is at least 1 character there, the second instance of INDIRECT is called on to return the name to B2 of the table Aux.
    Compare your formula below:
    B4: =IF(LEN(INDIRECT("Day 3"&ROW()-1&"::B2"))<1,"",INDIRECT("Day 3"&ROW()-1&"::B2"))
    As shown, this is the formula in B4 of your Aux table. In Row 4, ROW() returns 4, and ROW()-1 returns 3.
    So the three elements of the cell address constructed in INDIRECT are "Day 3", 3, and "::B2"
    The cell being addressed is "Day 33::B2", cell B2 on the table named Day 33.
    The error results from there being no table with that name.
    The fix (to the table part of the reference) is to change the first text string to "Day " (including the space after the word Day).
    The fix to replace Product with the driver name is to change "::B2" to ::B1"
    To fit the names of your day tables and the location of the driver's name on each, your formula in B2 should read:
    B2: =IF(LEN(INDIRECT("Day "&ROW()-1&"::B1"))<1,"",INDIRECT("Day "&ROW()-1&"::B1"))
    Regards,
    Barry

  • Automatically fill cells from reference table

    Not sure if this is even possible, but I thought I'd ask and see if anyone knows of a way to do this. Here goes.
    Can I have cells fill in information automatically from a reference table in another sheet? What I'm trying to do is this:
    I need to keep training records for a group. What I've created is a numbers document with two sheets. In the first sheet, I have a single table with two columns that lists all of the training courses in column B with their course codes in column A. For example, let's say that course C32 (listed in Column A) is a "Basic Training" course (so "Basic Training" is in column B). On the next row is the next course, the next row is the next course, etc. This is my reference table.
    Now in the second sheet, I have a table for each person. Each table is three columns. In the first I enter the course code they've taken, in the second I enter the date they took it, and what I'd LIKE to have happen is that when I enter the course code in Column A, the description from the reference table automatically fills into the third column. That way I don't have to type all the course descriptions over and over. (Some of them are fairly lengthy).
    Is there any way to do this in numbers?
    Thanks

    Yes, it is possible. Use the LOOKUP function. However, your lookup table must be in the same document, but can be on a separate sheet.
    Create a table of the course names (2 columns, code in A and name in B) and call the table (not the containing sheet) something significant such as "Course names". Then in Column C of each persons table use the formula =LOOKUP(A, Course Names :: A, Course names :: B). This says take the code reference from the first cell on the line (local column A) and compare it with the codes in the first column (Course names :: A) of the Course names table, and return the value from the second column (Course names :: B) of the matching row.
    Remember to enter the formula as a column formula to save having to repeat it in each cell.

  • BI - ABAP To pick the field from One table and link with 2nd table

    Hello, I am stuck to write the correct abap code. Requirement is that My Client BMW  California require the below:
    <b>1.</b>  list of invoices (BELNR) that a has tcode = FB01 and FBVB" from Table BKPF.  Account Number field (BELNR) is there in 0fiap_4 Data source
    <b>2.</b> Now Link the above invoice Number (BELNR)  that a has tcode = FB01 and FBVB" from Table BKPF to BMW Custom Table I_BMW_WI. - Field "PAT ID" which is the cocatenation of OBJNR (Object Number), Invoice Number and Purchase Year.  where PICK only thos PAT ID where "TYPEID"  Value = "BMW" in table I_BMW_WI.
    To solve Number 1 Please fix my abap code and help me to write the Code to Solve Number 2 and Link #1 AND #2.
    Please help me soon
    Code # 1
    case I_datasource.
    WHEN '0FI_AP_4'.
    loop at C_t_data into l_s_DTFIAP_3.
    l_tabix = sy-tabix.
    clear I_BMW_WI.
    if sy-subrc = 0.
    select single * from BKPF into I_BKPF where BELNR = l_s_DTFIAP_3-BELNR.
    LOOP AT I_BKPF into I_FINAL WHERE
    Code below is not working
    (I_BKPF-TCODE = ‘FV50’) OR (I_BKPF-TCODE = ‘FB01’)
    I_FINAL-BELNR = I_BKPF-BELNR
    modify I_FINAL.
    endloop
    modify C_t_data from l_s_DTFIAP_3  index l_tabix.
    endif.
    endloop.
    endcase
    Code # 2 -
    Please help with templates.
    Thanks
    Soniya Kapoor

    Hi,
    Ad Code #1
    First of all the key for BKPF consists of:
    BUKRS, BELNR and GJAHR so I think you should use all key fields in your SELECT statement:
    select single * from BKPF into I_BKPF
    where BUKRS = l_s_DTFIAP_3-BUKRS and
          BELNR = l_s_DTFIAP_3-BELNR and
          GJAHR = l_s_DTFIAP_3-GJAHR.
    And why do you test SY-SUBRC after CLEAR ?
    Your IF statement should be after SELECT...
    And last but not least when you are using SELECT SINGLE you always get only one record so what is the purpose of LOOP statement ?
    Try following code:
    case I_datasource.
    WHEN '0FI_AP_4'.
      loop at C_t_data into l_s_DTFIAP_3.
        l_tabix = sy-tabix.
        select single * from BKPF into I_BKPF
          where BUKRS = l_s_DTFIAP_3-BUKRS and
                BELNR = l_s_DTFIAP_3-BELNR and
                GJAHR = l_s_DTFIAP_3-GJAHR.
        if sy-subrc = 0.
          if (I_BKPF-TCODE = ‘FV50’) OR
             (I_BKPF-TCODE = ‘FB01’).
            I_FINAL-BELNR = I_BKPF-BELNR
            modify I_FINAL.
          endif.
          modify C_t_data from l_s_DTFIAP_3 index l_tabix.
        endif.
      endloop.
    endcase.
    regards
    Krzys

  • Get cell value from Woodstock table

    Hello,
    I am using a Woodstock Basic Table from the NB palette.
    One of the columns is editable and I need to get the updated values upon a button click event.
    How do I get the value of a specific cell from the table?
    Thanks

    Hi Rajashekar ,
    here is the code :
    // Get a handle to the table footer bean
    OATableBean tableBean = ...;
    OATableFooterBean tableFooterBean = tableBean.getFooter();
    if (tableFooterBean != null)
    // Get a handle to the total row bean
    OATotalRowBean totalRowBean = tableFooterBean.getTotal();
    --Keerthi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to add a cell from 2 different tables in 2 different Matrix(s) that reside on the same rdlc report?

    Hello Community
        Using Visual Studio 2008 I have created a Windows Forms Application in which I created
    Embedded Reports (rdlc).
        The embedded reports (rdlc) uses Matrix(s).
        Now on this one rdlc I have dragged 2 Matrix(s) onto the body.
        One of the Matrix datasource dataset name and table name is "DataSet1_Table1.
        A cells in the Matrix has a total column on the end as follows:
    =FormatNumber(Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value),"0")
        The other Matrix datasource dataset name and table name is "DataSet2_Table2.
        The cell in this Matrix has a total column on the end as follows:
    =Sum(Fields!fld1.Value)+Sum(Fields!fld2.Value)+Sum(Fields!fld3.Value)+Sum(Fields!fld4.Value)+Sum(Fields!fld5.Value)
        As you can see each Matrix has a different table.
        I would like to add the total columns from each table in each Matrix but I haven't been
    able to do it successfully. If I have to drag another Matrix or a Textbox on the
    body to do it that is okay and/or add another/different formula to a cell onto the body that is
    okay too.
        So my question is how can I add the contents of the total in cell from each table in each matrix
    which will create the "grand total"?
        Thank you
        Shabeaut

    It is possible to reference SSRS elements directly using the ReportItems collection. If your total tablix cell is outside of yoour matrix groups, you can use this collection to accomplish what you want:
    =ReportItems!Matrix1Total.Value + ReportItems!Matrix2Total.Value
    where Matrix1Total and Matrix2Total is the name of the cell that contains your totals. Note that for this to work, the cell name must be unique. If the total cell is inside a group, it will be repeated once for each instance of the group and will not be
    unique.
    You may be able to do it using the Sum aggregate and specifying the dataset for the scope variable:
    =Sum(Fields!fld1.Value, "DataSet1")+Sum(Fields!fld2.Value,
    "DataSet1")+Sum(Fields!fld3.Value,
    "DataSet1")+Sum(Fields!fld4.Value,
    "DataSet1")+Sum(Fields!fld5.Value,
    "DataSet1")+Sum(Fields!fld1.Value,
    "DataSet2")+Sum(Fields!fld2.Value,
    "DataSet2")+Sum(Fields!fld3.Value,
    "DataSet2")+Sum(Fields!fld4.Value,
    "DataSet2")+Sum(Fields!fld5.Value,
    "DataSet2")
    This will work as long as you are not filtering the dataset in your Matrix properties. If you are, those
    filters will not apply to this expression and the numbers will not total correctly.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Tbale Data Not picked from Child Table while configuring Database Adapter

    Hi,
    we are experiencing problem while picking multiple records from child table while polling from the database.
    details are, lets say we have one Parent table "Student (Id ,College) and one Child Table (Id,Book,Author)
    Id is Primary key in Student Table and Foregin in Child Table.Lets say data in tables are
    Student Table :196263,"Y.M.C.A"
    Child Table :196263,"English","Gill"
    196263 ,"Maths","Nagpal"
    Now what should be done while polling 1 record should be picked from student table and 2 diferent records from Child Table ..for the above given scenario...
    (I have used 1:M Relationship).
    But What is happening that from Child Table only first record got picked up 2 times..and record from Student Tablle was being picked correctly.....but in the ideal
    Cab anybody help me how to resolve this issues....

    Hi Gurus,
    I am facing similar kind of issue i.e. after polling on header table (Logical Delete), the header records are updated correctly.
    But the problem starts in child table. From Child Table only first record is getting picked up 2 times (if 2 rows are there for that particular header id).
    Kindly help.
    Thanks,
    Abhishek
    Edited by: Abhishek saurabh on Jul 31, 2009 1:09 AM
    Edited by: Abhishek saurabh on Jul 31, 2009 1:11 AM

  • Create release not picking data from Requisition table

    Hi All,
    I have imported release data from 11i to R12 through Requisition import program. Data got imported successfully. I have updated BLANKET_PO_HEADER_ID and BLANKET_PO_LINE_NUM column in po_requisition_lins_all table. Then I have ran Create Release Concurrent Program but that program Not picking the release from Requisition table.
    Can any one face this issue...Please let me know what thing i missing while doing this.
    Thanks.

    According to what I understand from your question, you have the Req successfully created but the the release is not happening when you run the create releases program.
    You have to have a ASL for this item with release property as Automatic Release and the BPO document number attached in the ASL attributes.
    Let me know if you have this setup or not.
    Karthik.

  • How to check at what time the extractor has picked records from r3 tables

    Hi experts ,
    If we want to know exactly at what time the Extractor has picked up the records from r/3 tables .
    or if we want to know the time stamp of extractor picking the records from r3 tables after r3 entries
    Regards ,
    Subash Balakrishnan

    Hi,
    The following are few function modules which will give you the information you need based upon the area you are working in.
    SD Billing: LOG_CONTENT_BILLING
       Delivery: LOG_CONTENT_DELIVERY
    Purchasing: LOG_CONTENT_PURCHASING etc...
    See if the above FMs help you in any way...

  • How do you sort a table that contains links to cells in another table?

    This is something that I used to be able to do in Numbers but since 2 or 3 updates ago this doesn't seem to happen.
    The problem I have is that I have a table that includes cells that are a sum of a number of cells from another table. When I try and sort by a column all the info in the cells change because, I imagine, the commands linking to the cells in the other table are offsetting by however many rows a particular row has moved.
    This didn't used to happen; it used to hold on to the same data and links regardless of where the sort function moved a row to.
    Had a look through the help pages but can't find anything about it. Has anyone found a way around this?
    Thanks in advance.
    Matt

    Hi mmatt,
    There are several ways to create sort-safe formulas. Without knowing what you are doing in your table it is hard to give specific advice but in general INDEX(), OFFSET() and I think INDIRECT() are sort safe- ie they will ocntinue to point to the same cell wherever they are in your sort.
    If you want specific advice you would need to provide more info.
    quinn

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • How to check from which table data is picking by datasource 0CDCY_ACT_ATTR

    Hi Experts,
    Could you please help me in finding out of the table from which datasource 0CDCY_ACT_ATTR is extracting.
    As per my knowledge is should be extract from tables(infotypes) HRP5135 - 5141.If i am wrong please correct me.
    Issue : My extractor(0cdcy_ACT_ATTR) is bringing wrong ACT_TYPE (Eg :5010) where as in table HRP5141 for that particular OBJID it is 9180( different).
    Please help me why my extractor is bringing ACT_TYPE 5010.
    This standard datasource and using Function Module :  RCF_BIW_GET_ACTIVITY, How can i check from which table it is picking the data
    Thanks in Advanve
    Sree

    Hi Sree,
    In RSA3 on the first screen, you have the option to start debugging by marking the debug check box, once you put all the selections, click on execute and it will go to debug mode, then keep on pressing F5. It will debug your code line by line, then you can check for all the select statements.
    Or once the debugging is started you will have the option to put break point on all the select statements in one shot, you can get in touch with your ABAP team.
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Jul 24, 2011 8:20 PM

  • How to get the data from a table cell

    Could somebody suggest me how I can get the data value from a table cell if I set that cell a Double object previously.
    Thanks very much

    Thanks for camickr's information.
    And thanks uhrand,
    I haven't got it sloved. I am sick on this problem.
    I have the methods to let the table editable. My tableModel code is from Sun Tutorial.
    It has the code like this:
    public int getColumnCount() {
                return columnNames.length;
             public int getRowCount() {
                return data.length;
              public String getColumnName(int col) {
                return columnNames[col];
             public Object getValueAt(int row, int col) {
                return data[row][col];
             * JTable uses this method to determine the default renderer/
             * editor for each cell.  If we didn't implement this method,
             * then the last column would contain text ("true"/"false"),
             * rather than a check box.
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
             * Don't need to implement this method unless your table's
             * editable.
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 1) {
                    return false;
                } else {
                    return true;
             * Don't need to implement this method unless your table's
             * data can change.
            public void setValueAt(Object value, int row, int col) {
                if (DEBUG) {
                    System.out.println("Setting value at " + row + "," + col
                                       + " to " + value
                                       + " (an instance of "
                                       + value.getClass() + ")");
                data[row][col] = value;
                fireTableCellUpdated(row, col);
                if (DEBUG) {
                    System.out.println("New value of data:");
                    printDebugData();
            public void printDebugData() {
                int numRows = getRowCount();
                int numCols = getColumnCount();
                for (int i=0; i < numRows; i++) {
                    System.out.print("    row " + i + ":");
                    for (int j=0; j < numCols; j++) {
                        System.out.print("  " + data[i][j]);
                    System.out.println();
                System.out.println("--------------------------");
            }

Maybe you are looking for