I have two JFrame Forms. One creates a user and the other one has a button to the user creator, as well as a table to show which users have been created.
Whenever I create a user, the info is written to a database, but it doesn't populate the table.
Here are the forms:
Apps.Settings.FTRun
Apps.UserManager.NewUser
The administrator clicks on add user, the Add User form opens. Then an user is created, and once the insert record button is pressed, the user gets uploaded to the database, as well as in the JTable. The JTable population isn't working correctly! Help!? It does, however populate locally when I create a test button to insert values. The table is of type public
.
The values that should get written to the JTable, are the Username (UploadUName) & Password (UploadPwd) fields.
Here's my coding:
1. From the Add User form, in the Insert Record button
try {
Apps.Settings.FTRun ftrun = new Apps.Settings.FTRun();
DefaultTableModel model = (DefaultTableModel) ftrun.jTable1.getModel();
model.addRow(new Object[]{UploadUName, UploadPwd});
System.out.println(UploadUName + " | " + UploadPwd);
} catch (Exception e) {
e.printStackTrace();
}