How to detect change in JTable cell without leaving the cell and enterin another one
Apirak Panatkool
Greenhorn
Joined: Apr 30, 2002
Posts: 15
posted
0
How to detect change in JTable cell without leaving the cell and entering another one. In other words, cell won't get updated if you just leave JTable and go to another component (losing focus). It only get updated if you leave the cell by clicking on another cell.
bAnk
Apirak Panatkool
Greenhorn
Joined: Apr 30, 2002
Posts: 15
posted
0
In a JTable, if you are editing the (last cell on the) last line, when you hit return nothing happens. It's wanting to move the cursor down a row and it can't, so even though it looks like you've made the change it hasn't actually gone through to the underlying table data.
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
Hi Apirak, You can programmatically move the editing cell to some other cell and then back again. Visually nothing changes and the table model gets updated with the user none the wiser. Something like the following should work in most cases:
Regards, Manfred.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to detect change in JTable cell without leaving the cell and enterin another one