+ contents.append("</body></html>");
+ String report = contents.toString();
+
+ JInternalFrame frame;
+ if (Platform.isJS())
+ {
+ JLabel textLabel = new JLabel();
+ textLabel.setText(report);
+ textLabel.setBackground(Color.WHITE);
+ JPanel pane = new JPanel(new BorderLayout());
+ pane.setOpaque(true);
+ pane.setBackground(Color.WHITE);
+ pane.add(textLabel, BorderLayout.NORTH);
+ frame = new JInternalFrame();
+ frame.getContentPane().add(new JScrollPane(pane));
+ }
+ else
+ /**
+ * Java only
+ *
+ * @j2sNative
+ */
+ {
+ CutAndPasteHtmlTransfer cap = new CutAndPasteHtmlTransfer();
+ cap.setText(report);
+ frame = cap;
+ }