* object.
*/
public static void refreshPlayerList(JList playerList, Client client) {
((DefaultListModel) playerList.getModel()).removeAllElements();
for (Enumeration<Player> e = client.getPlayers(); e.hasMoreElements();) {
final Player player = e.nextElement();
StringBuffer playerDisplay = new StringBuffer(player.getName());
if (player.isGhost()) {
playerDisplay.append(" ["); //$NON-NLS-1$
playerDisplay.append(Messages
.getString("PlayerListDialog.player_ghost")); //$NON-NLS-1$
playerDisplay.append(']'); //$NON-NLS-1$
} else if (player.isObserver()) {
playerDisplay.append(" ["); //$NON-NLS-1$
playerDisplay.append(Messages
.getString("PlayerListDialog.player_observer")); //$NON-NLS-1$
playerDisplay.append(']'); //$NON-NLS-1$
} else if (player.isDone()) {
playerDisplay.append(" ("); //$NON-NLS-1$
playerDisplay.append(Messages
.getString("PlayerListDialog.player_done")); //$NON-NLS-1$
playerDisplay.append(')'); //$NON-NLS-1$
}