private void updateTracePanel() {
		synchronized (newAlerts) {
			for (Alert alert : newAlerts) {
				try {
					if(!isAlertVisible(alert)) {	//If not visible, skip this alert in the loop
						continue;
					}

					//Pick a style to print with
					Style styleToPrint = null;
					switch (alert.level) {
					case ERROR:
						styleToPrint = errorStyle;
						break;
					case WARNING:
						styleToPrint = warningStyle;
						break;
					case INFO:
						styleToPrint = infoStyle;
						break;
					default:
						styleToPrint = defaultStyle;
						break;
					}

					//Insert the alert into the panel's document
					int endPosition = traceTextPane.getDocument().getEndPosition().getOffset();
					traceTextPane.getStyledDocument().insertString(endPosition, alert.toString() + "\n", styleToPrint);
					
				} catch (BadLocationException e) {
					e.printStackTrace();
				}
			}
			newAlerts.clear();	//We've dealt with the new alerts, so remove them form the new alerts list.
		}
	}