JTable cell selection event  
Author Message
donalmurtagh





PostPosted: 2003-10-28 3:10:00 Top

java-programmer, JTable cell selection event Greetings,

I have an application that uses a JTable. When the user changes the
value in one of the cells and moves to another cell (with either the
mouse or keyboard), I want to do something with the new value of the
changed cell, any idea how I can capture this event?

Thanks in advance,
Don
 
Dieter Decavele





PostPosted: 2003-10-28 3:18:00 Top

java-programmer >> JTable cell selection event The CellEditorListener interface?

Don wrote:

> Greetings,
>
> I have an application that uses a JTable. When the user changes the
> value in one of the cells and moves to another cell (with either the
> mouse or keyboard), I want to do something with the new value of the
> changed cell, any idea how I can capture this event?
>
> Thanks in advance,
> Don

 
Svetozar Radojcin





PostPosted: 2003-10-28 5:54:00 Top

java-programmer >> JTable cell selection event I am not sure, but try to play with
JTable.editingStopped() - or -
JTable.getCellEditor().addCellEditorListener(....)

-regards...

Don wrote:

> Greetings,
>
> I have an application that uses a JTable. When the user changes the
> value in one of the cells and moves to another cell (with either the
> mouse or keyboard), I want to do something with the new value of the
> changed cell, any idea how I can capture this event?
>
> Thanks in advance,
> Don


 
 
Srdjan Skrbic





PostPosted: 2003-10-28 22:14:00 Top

java-programmer >> JTable cell selection event You must implement this method (in table model):
public void setValueAt(Object val, int row, int col) !
Whenever user exits the cell, this method is called.
Does it works?

Srdjan.

"Don" <email***@***.com> wrote in message
news:email***@***.com...
> Greetings,
>
> I have an application that uses a JTable. When the user changes the
> value in one of the cells and moves to another cell (with either the
> mouse or keyboard), I want to do something with the new value of the
> changed cell, any idea how I can capture this event?
>
> Thanks in advance,
> Don


 
 
hilizbabe





PostPosted: 2003-10-30 7:45:00 Top

java-programmer >> JTable cell selection event You can use the quicktable verison of JTable, it generates an event
whenever a user modifies a cell and exits the cell. You have the
option to accept the user changes or set a new value to the cell.

http://dbtable.hypermart.net/doc/quick/dbtable/DBTableCellListener.html

java.lang.Object cellValueChanged(int row, int col, java.lang.Object
oldValue, java.lang.Object newValue)

For more information have a look at QuickTable
(http://dbtable.hypermart.net)

Cheers,
Liz.




email***@***.com (Don) wrote in message news:<email***@***.com>...
> Greetings,
>
> I have an application that uses a JTable. When the user changes the
> value in one of the cells and moves to another cell (with either the
> mouse or keyboard), I want to do something with the new value of the
> changed cell, any idea how I can capture this event?
>
> Thanks in advance,
> Don
 
 
donalmurtagh





PostPosted: 2003-10-30 17:59:00 Top

java-programmer >> JTable cell selection event Thanks Liz,

That sounds like just the job - I'm new to Swing, and coming from a
Delphi backgound (all bow), I find it frustratingly difficult to
accomplish what ought to fairly straightforward tasks such as this.

Thanks Again,
Don

email***@***.com (JavaGuru) wrote in message news:<email***@***.com>...
> You can use the quicktable verison of JTable, it generates an event
> whenever a user modifies a cell and exits the cell. You have the
> option to accept the user changes or set a new value to the cell.
>
> http://dbtable.hypermart.net/doc/quick/dbtable/DBTableCellListener.html
>
> java.lang.Object cellValueChanged(int row, int col, java.lang.Object
> oldValue, java.lang.Object newValue)
>
> For more information have a look at QuickTable
> (http://dbtable.hypermart.net)
>
> Cheers,
> Liz.
>