bugSummaryEditorPane.read(reader, "html summary");
if (summaryXML != null) { reader = new StringReader(summaryXML); bugSummaryEditorPane.read(reader, "html summary"); } else { bugSummaryEditorPane.setText(""); }
	private void setSummary(String summaryXML) {		bugSummaryEditorPane.setContentType("text/html");		/*		bugSummaryEditorPane.setText(summaryXML);		//      : unfortunately, using setText() on the editor pane		// results in the contents being scrolled to the bottom of the pane.		// An immediate inline call to set the scroll position does nothing.		// So, use invokeLater(), even though this results in flashing.		// [What we really need is a way to set the text WITHOUT changing		// the caret position.	Need to investigate.]		SwingUtilities.invokeLater(new Runnable() {			public void run() {				bySummary.getViewport().setViewPosition(new Point(0, 0));			}		});		*/		StringReader reader = new StringReader(summaryXML); // no need for BufferedReader		try {			bugSummaryEditorPane.read(reader, "html summary");		} catch (IOException e) {			bugSummaryEditorPane.setText("Could not set summary: " + e.getMessage());			logger.logMessage(Logger.WARNING, e.getMessage());		} finally {			reader.close(); // polite, but doesn't do much in StringReader		}			}