Person[] users = _application.getPersonsModel().getUsers(); for (int i = 0; i < users.length; i++) { Person user = users[i]; JPanel userSummaryArea = new JPanel(); JLabel label = new JLabel(user.getName()); JFormattedTextField totalField = new JFormattedTextField( new NumberFormatter(NUMBER_FORMAT)); totalField.setEditable(false); totalField.setValue(new Double(0)); totalField.setPreferredSize(new Dimension(65, 18)); _totalFieldsForUser.put(user, totalField); userSummaryArea.add(label); userSummaryArea.add(totalField);  add(userSummaryArea);
Person[] people = _application.getPersonsModel().getUsers(); for (int i = 0; i < people.length; i++) { Person person = people[i]; if (!person.getName().equals("Shared")) { add(createTotalField(person)); }
  private void refreshGui() {    removeAll();    _totalFieldsForUser.clear();    Person[] users = _application.getPersonsModel().getUsers();    for (int i = 0; i < users.length; i++) {      Person user = users[i];      JPanel userSummaryArea = new JPanel();      JLabel label = new JLabel(user.getName());      JFormattedTextField totalField = new JFormattedTextField(          new NumberFormatter(NUMBER_FORMAT));      totalField.setEditable(false);      totalField.setValue(new Double(0));      totalField.setPreferredSize(new Dimension(65, 18));      _totalFieldsForUser.put(user, totalField);      userSummaryArea.add(label);      userSummaryArea.add(totalField);      add(userSummaryArea);    }        // Both these calls seem necessary to get the UI to update.    validate();    repaint();  }