It's ok. Thanks anyway.
Type: Posts; User: mr.nacho
It's ok. Thanks anyway.
You mean? I just want to add/insert the at the end of the recordset displayed on JTable.
When I insert new data, it will automatically sort the data displayed on JTable.
Why does tablemodel automatically sort the data in database? I want to insert a data at the end of the resultset/table. How can I do it? THanks!!!
I thought firing events from the table model can do it alone.
I don't have any remove command in there, I just used direct deletion from database. Is that wrong? Also, I didn't use vectors. Sorry if I'm confusing you.
Yeah. That's what I want. Just like in visual basic 6's adodc/datagrid. Immediate response to change with ".refresh".
It is exactly what I choose to delete. The record from database is what I always successfully deleted and JTable is not even responding immediately to the change.. #:-s
It works but won't take effect until I delete it again or delete some other record. I don't use any method to delete record from JTable. Just the database. Do you get me?
--- Update ---
It...
Sir, I used rs.deleteRow() to remove a row..
What do you mean? It is stated in the code above in "btnDelete".
I'm sorry. I forgot. :o
model.connectDB();
if(e.getSource()==btnAdd)
{
String name = JOptionPane.showInputDialog(null,"Enter here: ");
sql = "Insert into friends...
The problem that I am now facing with that program is when I add/delete, the refresh/update of the JTable comes late. I need to do it two or more times for the model to apply the changes. Seems like...
What can be the problem with my code here? I'm trying to refresh/update the table connected to database.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import...