Map<String, String> reportData = new HashMap<String, String>();
reportData.put("Version Information", collectVersionInformation());
reportData.put("Stack Trace", collectStackTrace(e));
BugReporterDialog d = new BugReporterDialog(reportData);
d.setVisible(true);
Message m = new Message();
m.setMessage(d.getComment());
Map<String, String> attachments = d.getReport();
for (String key : attachments.keySet())
m.addAttachment(key, attachments.get(key));
if (d.getUserChoice() == BugReporterDialog.SEND_REPORT) {
log.fine("Sending bug-report...");
log.fine(m.toXML());
this.sendReport(m);
} else {
log.fine("Sending of BugReport cancelled...");