title: get a JLabel from JTextPane and change its text
body: <p>I add text with JLabel to the JTextPane, then I need to change the text in all JLabel's in the JTextPane. How can I do it?</p>
  
  <pre><code>...
  JTextPane pane = new JTextPane();
  HTMLEditorKit kit = new CompEditorKit();
  HTMLDocument doc = new HTMLDocument();
  pane.setEditable(false);
  pane.setContentType("text/html");
  pane.setEditorKit(kit);
  pane.setDocument(doc);
  ...
  kit.insertHTML(doc, doc.getLength(), "Test&lt;object align=\"left\" classid=\"javax.swing.JLabel\"&gt;&lt;param name=\"text\" value=\"22\"&gt;&lt;/object&gt;Test", 0, 0, null);
  EditLabels(doc);
  ...
  public void EditLabels(Document doc) {
      if (doc instanceof HTMLDocument) {
          Element elem = doc.getDefaultRootElement();
          ElementIterator iterator = new ElementIterator(elem);
          while ((elem = iterator.next()) != null) {
              AttributeSet attrs = elem.getAttributes();
              Object elementName = attrs.getAttribute(AbstractDocument.ElementNameAttribute);
              Object o = (elementName != null) ? null : attrs.getAttribute(StyleConstants.NameAttribute);
              if (o instanceof HTML.Tag) {
                  if ((HTML.Tag) o == HTML.Tag.OBJECT) {
                      View view = new CompView(elem);
                      //View view = (View)super.create(elem); //ERROR
                      //if (view instanceof JLabel)
                      //{
                      //  ((JLabel) view).setText("NM");
                      //  JLabel label = (JLabel)view;
                      //}
                  }
              }
          }
      }
  }
  </code></pre>
  
  <h2>E.G.</h2>
  
  <pre><code>View view = new CompView(elem);
  ((JLabel) view).setText("NM");
  error: inconvertible types
    required: JLabel
    found:    View
  
  View view = (View)super.create(elem);
  error: cannot find symbol
    symbol: method create(Element)
  </code></pre>