Refresh data in a jtable when data changes

I have a jtable grdTable and a tableModel mytableModel which extend abstract table model
I have a jcheckbox in the column 1 which i want to uncheck all
I am doing the following.The data is changed ,I could see by doing susyem.out.println() but the data in the table does not refreshes.
public void showTablechanges()
TableModel tm = grdTable.getModel;
for(int i=0 ;i<grdTable.getRowCount();i++)
grdTable.setValueAt(Boolean.FALSE, i, 1);
( (MyTableModel)tm).fireTableDataChanged();
grdTable.repaint();
What am i missing or what wrong I am doing.How can i make the data refresh.
I tried do a sys out after seting the value and it is showing as false but the checkbox is still checked.I have tried a lot of things but I am not able to refresh the jtable.
Please please help.
Thanks

Thanks so much for the reply I read the links.I modified my code as
public void showTablechanges() {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
TableModel tm = grdTable.getModel;
for (int i = 0; i < grdTable.getRowCount(); i++) {
grdTable.setValueAt(Boolean.FALSE, i, 1);
((MyTableModel) tm).fireTableDataChanged();
grdTable.repaint();
This makes no difference.What strange thing is happening out of 12 checkboxes ,11 are unchecked but the first one always remains checked.EVen without the
invoke later 11 are unchecked and 1 remains checked
This method is in a panel and this panel is invoked from another MAin panel which has a changelistener for this panel.
i.e if the method above is in myPanel.java then in my main panel,I have
myPanel.addChangeListener(this)
Also if i remove the line
((MyTableModel) tm).fireTableDataChanged();
All checkboxes remains checked.
I am really confused and this looks very tough to me ,Can you find out what is wrong
Thanks,

Similar Messages

  • Hi, I have iphone 4s and is up to date with ios7 but when I change my ring tone again ring the default ring tone

    Hi, I have iphone 4s and is up to date with ios7 but when I change my ring tone again ring the default ring tone
    in the setting shows the ring tone i,ve chosen

    I have been on chat and a telephone conversation with my internet provider SHAW.CA and they cannot seem to assit.
    I do appreciate your replies. When you talk about Exchange Server, do you mean"Microsoft Exchange" because that is what I used to set up mail on iPhone? I also tried iCloud, but i did not like the way you have to choose sending  "from" each time you send an email. I currently use 2 accounts,one for business, one personal.
    In response to your above reply; I went to "mailbox" - sycronise account", but nothing happened.
    Am I missing some other setting perhaps. I did "enable mobile" on internet provider webmail.

  • Are data in aggregates deleted when data in a Cube is archived (BI 7.0)?

    Hi all
    Do you know if the deletion run which is a part of the arching process will delete data in aggregates as well when data in a given infocube is archived?
    Kind regards,
    Torben

    Hi Torben,
    we are following the normal procedure through SARA and we are not using ADK.so i don have any idea about ADK.
    More over while scheduling the archive job keep in mind that there is no confliction with the loading procedure (which includes rollup,compression recreating the indexes etc,,..).so it wont effect the normal procedure.
    Only the thing is if you are using ADK then the things remain same but all should be taking care by the ADK i think.
    Thanks,
    Ashok

  • How to retrieve Data in a JTable, When you click on the specified line?

    I Have a JTable. When I click on a line, I want to retrieve the value of the last column of the selected line.
    I do that:
    int selectedRow = lsm.getMinSelectionIndex();
    int selecRow = lsm.getMaxSelectionIndex();
    String res="";
    if (selectedRow == selecRow)
    System.out.println("number of colomns="+nbCol);
    indiceDoc=(String)(data[selectedRow][1]);
    res = " Row "+selectedRow + " selected"+"Indice =:"+indiceDoc;
    else res = " Rows "+selectedRow + " to "+selecRow + " selected";
    When the table is not sorted, it's ok, but when I sort one or more colomns, it don't return the correct value. It returns the value of an other line.
    "Data" is my original table, but I think that it don't change when sorting.There is the Problem I thinK.
    I think its because the index of the lines is reinitialize after each sorting.
    Do you have an Idea?

    The problem seems to be the sorter. You will have to ask the sorter for the sorted row number.
    I have modified my TableSorter with a new method:
    public int getJTableRowToModelRow(int index) {
         return indexes[index];
    So in my class which holds the tablemodel, table & sorter if I want to get hold of an row I write:
    int selectedRow = table.getSelectedRow();
    int sorterRow = sorter.getJTableRowToModelRow(selectedRow);
    Object data = tableModel.getData(sorterRow);
    tableModel.getData(int row) is an added method to the tablemodel. It only, in your case, returns data[row][1];
    I hope this wasn't to messy for you... ;-)
    //David

  • Calculate Start and End date in Connect By -- When Hirerchy Changes

    /* Formatted on 5/20/2013 9:53:00 AM (QP5 v5.115.810.9015) */
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Hello , Can some one Please help me or Guide me in calculating Start and End dates for the below logic
    I want to calculate the Manager Hirerchy for the given Agent.
    Then Below Query is working fine and its giving me the desired results
    But when there is a change in the Manager Hirerchy or Manager gets Promoted
    Then i need to calculate the start date and end date.
    CREATE TABLE PERSON_DTL
      SID                 VARCHAR2(10 BYTE),
      EMP_MGRS_ID         VARCHAR2(10 BYTE),
      START_EFFECTIVE_DT  DATE,
      END_EFFECTIVE_DT    DATE
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M100', 'M107', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M101', 'M102', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('A100', 'M100', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M100', 'M101', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/18/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M107', 'M102', TO_DATE('05/20/2013 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M102', 'M103', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M103', 'M104', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('A101', 'M105', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into PERSON_DTL
       (SID, EMP_MGRS_ID, START_EFFECTIVE_DT, END_EFFECTIVE_DT)
    Values
       ('M105', 'M106', TO_DATE('01/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('12/31/9999 00:00:00', 'MM/DD/YYYY HH24:MI:SS'));
    COMMIT;
    SELECT   CONNECT_BY_ROOT (b.sid) agent_sid,
                 TRIM (
                    LEADING ',' FROM    SYS_CONNECT_BY_PATH (b.sid, ',')
                                     || ','
                                     || b.emp_mgrs_id
                    PATH,
                 START_EFFECTIVE_DT Start_dt,
                 END_EFFECTIVE_DT End_dt
          FROM   PERSON_DTL b
         WHERE   CONNECT_BY_ISLEAF = 1
    START WITH   sid IN ('A101', 'A100')
    CONNECT BY   PRIOR b.emp_mgrs_id = b.sid
    This is the results that i am getting now.
    AGENT_SID    PATH                       START_DT    END_DT
    A100    A100,M100,M101,M102,M103,M104    1/1/2010    12/31/9999
    A100    A100,M100,M107,M102,M103,M104    1/1/2010    12/31/9999
    A101    A101,M105,M106                   1/1/2010    12/31/9999
    Results Required
    A100    A100,M100,M101,M102,M103,M104    1/1/2010    5/18/2013
    A100    A100,M100,M107,M102,M103,M104    5/20/2013   12/31/9999
    A101    A101,M105,M106                   1/1/2010    12/31/9999

    May be this..
    SQL> select agent_sid,max(path) path,max(start_dt) start_dt,
      2         min(end_dt) end_dt
      3  from
      4  (
      5    select agent_sid,path,start_dt,end_dt,
      6           sum(flg) over(order by rn) sm
      7    from
      8    (
      9      select agent_sid,
    10             path,
    11             start_dt,
    12             end_dt,rn,
    13             case when path like lag(path) over(order by rn)||'%' then 0 else 1 end flg
    14      from
    15      (
    16        SELECT   CONNECT_BY_ROOT (b.sid) agent_sid,
    17                 TRIM (
    18                    LEADING ',' FROM    SYS_CONNECT_BY_PATH (b.sid, ',')
    19                                     || ','
    20                                     || b.emp_mgrs_id
    21                 )
    22                  PATH,
    23                 START_EFFECTIVE_DT Start_dt,
    24                 END_EFFECTIVE_DT End_dt,rownum rn
    25        FROM   PERSON_DTL b
    26        START WITH   sid IN ('A101', 'A100')
    27        CONNECT BY   PRIOR b.emp_mgrs_id = b.sid
    28      )
    29    )
    30  )
    31  group by agent_sid,sm
    32  order by agent_sid;
    AGENT_SID  PATH                                     START_DT  END_DT
    A100       A100,M100,M101,M102,M103,M104            01-JAN-10 18-MAY-13
    A100       A100,M100,M107,M102,M103,M104            20-MAY-13 31-DEC-99
    A101       A101,M105,M106                           01-JAN-10 31-DEC-99Edited by: jeneesh on May 20, 2013 7:54 PM
    Not thoroughly tested.And not sure whether an easy way exists..

  • NOTE OSS 757361 - Additional data records in BW when document changed

    Hi developers,
    you can give me clarifications on this part of note.I have not understood where do enhancements. I must inserted code in EXIT_SAPLRSAP_001 for the  fields added for the procedure delta when the field is modified?
    This USEREXIT_SAVE_DOCUMENT_PREPARE where must be checked?
    Solution: Check the user exits of the SD and LE (such as the        
    USEREXIT_SAVE_DOCUMENT_PREPARE) for the following or similar code:  
    if XVBAP-UPDKZ is initial.                                          
      xvbap-updkz = 'U'.                                                
      modify xvbap.                                                     
    endif. 
    Thanks and regards
    Domenico

    Hi Domenico,
    this note is relevant only if you have some problem (duplication of some records, wrong after image and so on...) when you upload your delta in Logistic Cockpit area AND you enhanced your LIS communication structure (MCVBAP and so on...) thanks to some LIS user-exit (USEREXIT_SAVE_DOCUMENT_PREPARE, that is, specific code that fill your added fields when a document is saved
    In other words, this note is not relevant if you are doing some enhancement in the transfer structure, because you cannot, from there, manage any delta mechanism and image!
    Let me know if you need some more explanations..
    Hope it helps!
    Bye,
    Roberto

  • For Refreshing a table display in ALV when data is chngd in maintainance vi

    Hi All,
    I am displaying the fields of a Ztable in a ALV report. A maintainance view call button is attached to that report through which data of Ztable can be changed.Prolem is that when after changing the data when I return back to report, changes are not reflected.
    Kindly suggest to solve this problem.
    I am using ALV display through class.
    I have already used these functions in the else condition of IF GO_CUSTOM_CONTAINER IS INITIAL.
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    For maintainance view I am using the function as
    VIEW_MAINTENANCE_CALL on double clicking the maintain button.
    Kindly suggest.
    Ashutosh Kumar

    Ashutosh,
    Just calling the REFRESH method will not work. You need to re-fetch the data into the same internal table which you using the displaying the data in the grid.
    Probably you can write this data fetching as a subroutine and call this as soon as come back from the Maintenance screen. And updating the internal table, call the REFRESH method.
    This should work.
    Regards,
    Ravi
    Note : Please reward points if this helps.

  • [Forum FAQ] How do I send an email to users when the data in the report have been changed in Reporting Services?

    Introduction
    There is a scenario that the data in the report changes infrequently, so the users want to be informed and get the most updated data once the data changes. By default, report server always run the report with the most recent data. Is there a way that we
    can subscribe the report, so that we can send an email to users when the data in the report has been changed?
    Solution
    To achieve this requirement, we can create a subscription for the report, then create a trigger in the table which including the report data. When this table has data insert, update or delete, it will be triggered and execute the subscription to send email
    to users.
    In the Report Manager, create a subscription for the report and make it only execute one time.
    When we create a subscription, a corresponding SQL Agent job will be created. Then we can use the query below to find out the job based on ScheduleId:
    -- List all SSRS subscriptions
    USE [ReportServer];  -- You may change the database name.
    GO 
    SELECT USR.UserName AS SubscriptionOwner
          ,SUB.ModifiedDate
          ,SUB.[Description]
          ,SUB.EventType
          ,SUB.DeliveryExtension
          ,SUB.LastStatus
          ,SUB.LastRunTime
          ,SCH.NextRunTime
          ,SCH.Name AS ScheduleName   
              ,RS.ScheduleId
          ,CAT.[Path] AS ReportPath
          ,CAT.[Description] AS ReportDescription
    FROM dbo.Subscriptions AS SUB
         INNER JOIN dbo.Users AS USR
             ON SUB.OwnerID = USR.UserID
         INNER JOIN dbo.[Catalog] AS CAT
             ON SUB.Report_OID = CAT.ItemID
         INNER JOIN dbo.ReportSchedule AS RS
             ON SUB.Report_OID = RS.ReportID
                AND SUB.SubscriptionID = RS.SubscriptionID
         INNER JOIN dbo.Schedule AS SCH
             ON RS.ScheduleID = SCH.ScheduleID
    ORDER BY USR.UserName
             ,SUB.ModifiedDate ;
    Create a trigger in the table which including the report data.
    CREATE TRIGGER reminder
    ON test.dbo.users
    AFTER INSERT, UPDATE, DELETE
    AS
    exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    Please note that the command ‘exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'’ is coming from the job properties. We can go to SQL Server Agent Jobs, right-click the corresponding job to open
    the Steps, copy the step command, and then paste it to the query.
    Then when the user table has data insert, update or delete, the trigger will be triggered and execute the subscription to send email to users.
    References:
    Subscriptions and Delivery (Reporting Services)
    Internal Working of SSRS Subscriptions
    SQL Server Agent
    Applies to:
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Thanks,
    Is this a supported scenario, or does it use unsupported features?
    For example, can we call exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='b64ce7ec-d598-45cd-bbc2-ea202e0c129d'
    in a supported way?
    Thanks! Josh

  • How can I get right data in a cell of JTable when table  enter editing

    how can I get right data in a cell of JTable when table enter editing

    how can I get right data in a cell of JTable when table enter editing

  • How to change availability date of a batch when doing GR for order in MIGO

    Hi all,
    We are not able to find any exit or BADI to change availability date of batch when doing goods receipt for a order.
    Exits and BADIs are available for other dates but not for availabiliy date.
    One Exit that is available for available date but is not triggered while doing GR for an order.
    Please let me know how to achieve this.
    Thanks and Regards,
    Taranam

    Hi,
    You can use the remodelling here with the option " Replace Characteristics" with Customer exit. It will allow you to write an exit and change the value. Find more here:
    http://www.scribd.com/doc/7882193/Remodeling-in-BI-70-Using-Customer-Exit
    Thanks...
    Shambhu

  • I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before.

    I had to change my Hard Drive, now I want to work on files in iWeb, but can't access Time Machine before yesterday. The dates are there on the right hand side but are greyed out before yesterday when I changed my HD. How do I access anything from before?

    Start with B5/6 in the 1st linked article.
    Time Machine Troubleshooting
    Time Machine Troubleshooting Problems

  • My iphone 3gs has started showing the wrong time  and date. All was fine until this afternoon when it changed.  My apps have the right time and date. However the world clock is wrong. I have to turn off the automatic time setting to get the right time.

    My iphone is showing the wrong time and date. All was well until sometime this afternoon when it changed...  to Nov 5 (2 days prior to today), and about 9 hours and some minutes before the actual time.  The world clock for my time zone shows the same wrong date and time. My calender shows the same wrong date and time.  The phone can not find my time zone any more.   The only fix I found was to turn off the automatic setting for time.  What is  happening? Ideas?

    just sorted mine went to
    settings-mail,contacts,calender-timezone support
    then turned it off then on tapped time zone and typed london
    this did sort mine

  • In base component when user change the serial number we need to set date time in Extra attribute filed

    HI Team,
    In ibase component when user change the serial number we need to set date time in Extra attribute filed..if we click edit ,User change serial number after save we need to set date time in  Extra Attribute 4 field .
    Component - PRDGENSET
    In this component there is no attributes,so where we need to implement and how to implement please help.
    Thanks
    kalpana

    Hi Abi,
    Thanks for your reply..see i debugged..i have put break point in method SET_S_STRUCT method if press enter in serial number ,debuggeris triggered..in SET_S_STRUCT method value getting serial number..so how to write the logic here...
    In GET_S_STRUCT method iam getting all attributes  but serial number is not filled..So could you please help here what to do..
    in set_S_STRCUT method value iam gettin serial number...in collection wrapper iam geting zrealtions if i open attributes_ref -if i pass Attribute value in run time its getting displayed.so how to write the logic based on serial  number please help some coding.
    Thanks
    kalpana

  • I am trying to organize thousands of images in aperture.  The dates on the old scanned images is all 2008, when I started importing them.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

    I am trying to organize thousands of old images in aperture.  Aperture dates them all in 2008, when I started this project.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

      I just tried a test library, re-imported fresh images from a hard drive, and the date changes still revert.
    So neither your external drive nor your Aperture library are to blame.
    What do you mean test in a different user acct?  Would it be a good idea to uninstall and re-download aperture 3?
    Appreciate all your help.
    I meant the trouble shooting procedure described here:  Isolating an issue by using another user account
    To test, if some settings in your user account are faulty or preferences files corrupted, it helps to create a new user account from the "Users&Groups" System preferences. With a brand new user account you can see, if something in your current account is causing this.
    Should you see, that Aperture is not even working from a new and clean account, I'd reinstall Aperture, and if need be the Operating system.  Are you using any plug-ins?

  • Recently I noticed that when I change the name of a photo (correcting a mistake) it always goes back to the previous name, keeping the mistake I'm trying to correct. A spelling mistake, for example. As I keep my photos organized by name and not by date, t

    Recently I noticed that when I change the name of a photo (correcting a mistake) it always goes back to the previous name, keeping the mistake I'm trying to correct. A spelling mistake, for example. As I keep my photos organized by name and not by date, this is very annoying.
    And today it won't even read my camera's sd card, and I try with 2 different ones. If I restart the computer, leaving the memory card in, then it reads it; but if I pull it out and push it back in it doesn't see it. Whath am I doing wrong, if anything?
    Diane

    Where/how are you trying to change the name? If it is in Finder (after you've downloaded the pics to your desktop), highlight the pic icon and press Return. the name field will change and you can type in your new name. Hit Return again. That should make it "stick".  If you're trying to do it elsewhere, please post the steps that you've tried.
    As for your card: do you eject it properly? Either drag icon to trash or hit the eject symbol in the sidebar?

Maybe you are looking for

  • CRM WEB UI log in page images and text

    Hi Experts, At Login page of WEB UI, I want to remove the image of u201CSap net weaver sap Web Application serveru201D  I want to remove the warning message: No switch to HTTPS occurred, so it is not secure to send a passwordu201D And I want to remov

  • IPhoto stopped recognizing my iPhoto library, and it will not let me click open when I find the library in my files. Suggestions?

    I have seen similar questions--mostly from 4-6 years ago--but none are quite the same as mine.  I tried to export a photo from the web to iPhoto for editing and received a message stating, "Which photo library do you want iPhoto to use? To open, iPho

  • Switching iTunes Library to External HD

    Okay so heres my dilemma... I want to use my external HD as my new iTunes library. However I want to keep all the music from my old library on my internal drive still in iTunes. The main reason for this change is I want to have my podcasts be saved t

  • Solid State Drive Cost

    My neighbor is looking to possibly buy a Macbook Pro this month. She would like to get the 512 solid state drive upgrade but the cost is utterly nuts. My reply to her was, "why pay less when you can pay more?" Seriously. I did mention that she could

  • Exchange Partition on large Partition tables in dataware house

    Hi all, oracle 10.2.0.4(64 bit) and OS 5.3 (64 bit). We have large tables in our DWH size in TB and data is for 13 Months. Now our management want to split these tables in two. current tables contain data for 3 months and current month and history ta