Display all the simulated values in a DefaultTableModel in a GUI, not only the last one

Viewed 44

I'm trying to display all the simulated values of the Blood Pressure simulator received from a socket

The UserID  sent from the socket was: 1
The SystolicBP sent from the socket was: 9
The DiastolicBP sent from the socket was: 6
The UserID  sent from the socket was: 2
The SystolicBP sent from the socket was: 11
The DiastolicBP sent from the socket was: 9
The UserID  sent from the socket was: 3
The SystolicBP sent from the socket was: 18
The DiastolicBP sent from the socket was: 14
The UserID  sent from the socket was: 4
The SystolicBP sent from the socket was: 15
The DiastolicBP sent from the socket was: 12
The UserID  sent from the socket was: 5
The SystolicBP sent from the socket was: 19
The DiastolicBP sent from the socket was: 16
The UserID  sent from the socket was: 6
The SystolicBP sent from the socket was: 14
The DiastolicBP sent from the socket was: 11
The UserID  sent from the socket was: 7
The SystolicBP sent from the socket was: 19
The DiastolicBP sent from the socket was: 16

But trying to display it using a DefaultTableModel using the

private void DisplayActionPerformed(java.awt.event.ActionEvent evt) {                                        
    model.insertRow(
        model.getRowCount(), 
        new Object[] {
            this.getBPMSUserID(), 
            this.getBPMSSystolicBP(), 
            this.getBPMSDiastolicBP()
        }
    );

I get only the last simulated value in the table
7 19 16

How can I display them all?

0 Answers
Related