Re: Duplicate Entry in the ListBox

2022-01-13 Thread Zulfi Khan
Hi Peter Van den hombergh,I added model.clear in : private void btnDispAllActionPerformed(java.awt.event.ActionEvent evt) {         // TODO add your handling code here:     model.clear();     model.addElement(" " + acc1.getBalance() + " " + acc1

Re: Duplicate Entry in the ListBox

2022-01-13 Thread Pieter van den Hombergh
Zulfi, That is because you add the items every time when the display all accounts buttons is pressed. A list has now problems containing duplicate accounts, so expect no help from the list. You might want to update the model only when needed, not on each display. On Thu, Jan 13, 2022 at 3:33 AM Z