// Update the number of peers and the peers window. void update(int peers) { if (window != null && this.peers != peers) { this.peers = peers; peersLabel.setText(String.valueOf(peers)); } peersWindow.update(); }