How can I read the last cell of a JTable that a user Enters data

I have a one column JTable with several rows that a user enters data to. Upon entering the last data, the user clicks a button to read all the data from the rows in the JTable and puts them in an arraylist. If the user does not click enter or navigates away from the last cell, then after clicking the button it does not read the last cell entered. Since the user is clicking on a button to indicate he is done entering data on the table, does he also have to hit the enter key to indicate he is done entering the data?
The code below is my tablemodelListener:
public class InteractiveTableModelListener implements TableModelListener {
public void tableChanged(TableModelEvent evt) {
if (evt.getType() == TableModelEvent.UPDATE) {
int row = evt.getFirstRow();
System.out.println("Update row:"+" "+row);
jTable1.setRowSelectionInterval(row, row);
}

Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
In the future, Swing related questions should be posted in the Swing fourm. (This question has been asked and answered dozens of times).
But there is not need to repost because [Table Stop Editing|http://www.camick.com/java/blog.html?name=table-stop-editing] explains whats happening and give a couple of solutions.

Similar Messages

  • How can I read the last alarm ocurred?

    I want to know what Tag is the last to get into alarm. How can I do
    that with the DSC module?

    In LabVIEW DSC, there is the Alarm Summary Display Listbox, which will allow you to view information about historical alarms. This listbox will show you the Date, Time and Tag name for each alarm that is generated. I would recommended that you take a look at a shipping example called "Alarms and Events Viewing Options" which shows an example of using this Listbox. This should work in your occasion.
    Hope this helps.
    Patrick R.

  • When reading an EBook, how can I mark the last page I have read?

    When reading a PDF EBook, how can I mark the last page I have read?

    Hi Pickles 77,
    Sorry to hear you are having issues with your iTunes Store purchase.   The following information should help you with this:
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
    To report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase, follow these steps:
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed.
    Hope this helps ....
    - Judy

  • How can I reference the last value in a column?

    How can I reference the last value in a column? For example, today I want the value of A1 to appear in another cell. Tomorrow, I will add a row and want to reference A2, next day A3, and so forth.

    Now I got it:
    =OFFSET(A1,COUNT(A)-1,0)

  • How can I get the last updated email address of the customer ??

    Dear All,
    Please let me know, How can I get the last updated email address of the customer ??
    Also, I am trying to read CDHDR table where OBJECTCLAS is ADRESSE, however what value should be passed into OBJECTID field, looks like it is ADRNR with a Suffix BP.
    Please confirm me what value should be passed into OBJECTID field.
    Thank you.
    Anitha

    Hi Anitha,
      Check if this is something that helps you:
    Change documents in BAS
    CDHDR
    address type 1
    objectclass = ADRESSE             
    objectid = addrgroup + addrnumber     (ADRC-ADDR_GROUP + ADDRNNUMBER) !!
                     'BP  000xxxxxx'
    private address (address type 2)
    objectclass = ADRESSE2
    objectid =  'BP  000xxxxxx000yyyyyyy'   
                            persnumber+adrnr private
    address type 3
    objectclass = ADRESSE3
    objectid =  'BP  000xxxxxx000zzzzzzz'
                              persnumber +comp.address
    The above details is from the link: http://wiki.sdn.sap.com/wiki/display/ERPLO/LO-MD-BP
    Regards,
    Swarna Munukoti

  • How can i check the last location of iphone when it was on?

    I left my iphone in a taxi, but i found the taxi's home, i went to his home and i told him to give me back my iphone but he told me that he never seen iphone in his taxi.
    the iphone was on when i left it in the taxi and it was still on till 4 hours after i left it, probably he found the iphone and went to his home so i just wanna check the last location of iphone, if it shows in his home area so i will be sure that he got the iphone and then i contact the police to take it back but otherwise i can not do anything cause he says i haven't found it.
    plz plz help me

    it was active when i lost it and i went to icloud website, but it shows offline. that means that it is off.
    i just need to know if the iphone keeps recording of location where you go and how can i see the last location of iphone when it was on.

  • How can I see the last location of a now dead ipod touch 4G that had find my iphone turned on?

    How can I see the last location of a now dead ipod touch 4G that had find my iphone turned on? I can see my macbook but I cant see the last location of my ipod touch. I lost it a few weeks ago and figured it would show up. But it has not and I need it again for my job. Please help.

    There is nothing you can do now. There are apps available from the app store that would give you that information if installed before it was lost/stolen.

  • HT201472 How can I locate the last location of my iPhone 5s because it is dead and cant be located offline?

    How can I locate the last location of my iPhone 5s because it is dead and cant be located when its offline?

    Apple does not offer a user-searchable log of where the phone has been. Not saying they don't keep one, but I think you'd need a search warrant or work for the NSA or FBI to get access to such data.

  • TS3376 i have lost my iphone and have put it in lost mode. it says that i can trace the last 24 hours however it is only showing me where the phone was at 7 pm last night and it is grey mode... so obvoiously off how can i see the last 24 hours?

    I have lost my iphone 3. I have placed it in Lost Mode however it is only showing my last location at 7 pm last night. How can i see the last 24 hours? it is in Grey so not on..

    Find My iPhone only keeps a history of locations after you put it in lost mode.  It also has to be online to provide an updated location.

  • How can i get the lasted vision of visual administrator

    HI:
    when i connet j2ee engine,i get the system warning:
    "visual administrator vision is older than the version of j2ee engine kernel: ..."
    how can i get the lasted vision of visual administrator?

    Get your portal administrator to copy the j2ee/admin from the server you're trying to connect to.  You can then install and run it from your local hard drive.

  • How can I keep the last word without devision?

    Hallo! By applying page brake if it is a word at the end which has a syllable division the division line disappears so that I have an orthographic error: e.g. if the last word is "marketing" and is being devided:
    Before: End of current page: marke-
    Start of next page: ting.
    After applying page brake:
    End of current page: marke
    Start of next page: ting.
    How can I keep the last word without devision?

    In the Hyphenation Options dialog, uncheck the option "Hyphenate across
    columns"

  • How can we update the last synchronization date and time..on SUP in sccm 2012 R2

    Hi,
        Can you any one please guide me how can i update the last  synchronization date & time in SUP on SCCM2012 r2 , some how its updated as future date and when ever i try to synch the SUP with disconnected WSUS its shows in the wsyncmgr.log 
    "Wakeup for a polling cycle " and  " Wakeupby inbox drop" and "Wakeup by SCF change"  
    Thanks 
    Balaji K

    You'll probably have to call CSS on this one as this not normal by any means. The messages you noted above are completely normal but if that's all you are seeing then there's an issue.
    Have you reviewed wcm.log and wsusctrl.log?
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • How can I read the bootstrap files and extract the fragment-URLs and fragment-numbers in plain text?

    How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
    Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh  f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
    Thank you!

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • I have an Ipod touch updated to last available ios 4.2.1. How can I get the last compatible versions of the apps?

    I have an Ipod touch updated to last available ios 4.2.1.
    How can I get the last compatible versions of the apps?
    In the appstore there are only the lat app versions, most of them are incompatible with my device.
    I know that previous versions of these apps were compatible with my ipod.
    Can all download them someway?
    thanks

    The problem is: I never had the compatible versions. But I want them, I'd buy them if I could.
    So I'm stuck with my Ipod, which can't be upgraded anymore to higher IOS versions, and with the appstore, that does not offer older versions; versions that have existed and still exist, perhaps in the recycle bin of some users, or somewhere in the appstore servers.
    I know, its a policy, just to sell more devices. Will not work with me. I'm not buying more Ipods

Maybe you are looking for

  • Help for date compare in sqlite?

    Hi all,       How to decide a date is between two date or not? for example, I want to query the tasks in the next week from the sqlite db, how to do?         SELECT  * FROM TASK_TD WHERE TASK_DATE > NOW AND TASK_DATE < NEXTWEEK_DATE     That does not

  • Flash Crashes 95% of the  Time in Both Safari and Firefox

    I am using the latest Flash Player (10.0.42.34) on Mac OS X Snow Leopard 10.6.2 with all the updates. It crashes on most videos, but not all. It does not seem to crash on YouTube videos, but it crashes on most other videos from everywhere. I’ve remov

  • Manual Material Reservation and PR genaration.

    Hi Friends At the tome of manual material reservation , if material is not in stock then Purchase requisition  should be generated. How to do this.Any configuration is needed. Regards, Mahesh.

  • Bex Refresh from VB Auto_open macro

    We are using Release 2004s, SP 12, Patch 1, revision 578.   Here is issue: I understand and I am OK with having all items updated during refresh (versus individual queries in pre NW).   I am using this syntax in the auto_open VB code.     Run "bexana

  • Audio discussion tool. which platform?

    hello! i would like you to help me choose the "correct" development platform for a project, which starts soon. my "tool" should provide following functionality: - upload mp3-files to a specific directory on a web-server, which can be streamed later v