rdhiravani 0 Light Poster

Hi,
I have a JTable (call it Log Table) in my code showing Records & below that I have other tables showing some statistics based on new Record Inserted.
The Log Table contains 21 columns. Each time a new record fetched is inserted into Log Table as it is & accordingly other tables are refreshed. Log table can have thousands of rows.

My question is that , If I use getValueAt(int row, int col) method of TableModel , each time I will call fireTableDataChanged() , the entire table (all cells) will be updated, though I know I have only to add a row. So I want to use addRow(Vector v) method, for that I will have to build the Vector , as Data Record coming to my code is through fields of custom Class. My Code consist of v.add() like lines 21 times.

Is it good Practice to use such coding? Suggest me any other way of doing same.

Also how to highlight(change backgound color) records of Log Table according to some condition on data.

Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.