need opinion on how to implent data validation on jTable

Hi,

I have developed an application that does a great deal of data entry and manipulation through JTables.

However, I have been asked to perform some validation on the data contained in the cells.

Before doing so, I need to know if it is better for me to implement the validation on the fly (e.g. while JTable setValueAt or TableModel.getValueAt()) or by using a simple button on the GUI that performs the validation manually and informs the user accordingly.

I am afraid that "on-the-fly" validation may cause a great overhead while manual validation may let the user add data while not knowing that something is wrong...

any advice would be greatly appreciated!

[702 byte] By [xpantaa] at [2007-11-27 8:24:37]
# 1
You should validate it when the user enters the data. (It won't be slow if you only validate the new data)
kajbja at 2007-7-12 20:13:44 > top of Java-index,Java Essentials,Java Programming...
# 2
Thank you very much, I will do as you suggest. However, there is a problem when the user enters a bunch of data when performing a 'paste' operation... I don't know if it is logical to validate the data while 'pasting'... what do you think?
xpantaa at 2007-7-12 20:13:44 > top of Java-index,Java Essentials,Java Programming...