+ if (htmlPane == null)
+ {
+ htmlPane = new JLabel();
+ }
+ JLabel l = (JLabel)htmlPane;
+ l.setText(newtext);
+ Font f = htmlPane.getFont();
+ l.setFont(new Font(f.getFamily(), Font.PLAIN, f.getSize()));
+ l.setBorder(new EmptyBorder(new Insets(5, 5, 5, 5)));
+ l.setOpaque(true);
+ l.setBackground(Color.white);
+ htmlPane = l;
+ }
+ else
+ /**
+ * Java only
+ *
+ * @j2sIgnore
+ */
+ {
+ if (htmlPane == null)
+ {
+ htmlPane = new JTextPane();
+ }
+ JTextPane pane = (JTextPane)htmlPane;
+ pane.setEditable(false);
+ pane.setContentType("text/html");
+ pane.setText(newtext);
+ pane.addHyperlinkListener(this);
+ htmlPane = pane;
+ }
+ htmlPane.addMouseListener(closer);
+ htmlPane.setSize(new Dimension(750, 375));
+ add(htmlPane, BorderLayout.CENTER);
+ int h = htmlPane.getHeight() + iconimg.getHeight();
+ iframe.setBounds(Math.max(0, (desktop.getWidth() - 750) / 2),
+ Math.max(0, (desktop.getHeight() - h) / 2), 750, h);
+ iframe.setVisible(true);