Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8358814

Consider deprecating Swing HTML APPLET tag (or not)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 26
    • client-libs
    • None

      Working on the details of removing the java.applet package,
      I started to question if there's any point to still keeping Swing's HTML parser recognising the applet tag - it surfaces in the two APIs below

      Nothing is done to act on an applet tag, except that it is recognised and assigned to be handled by
      "javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction" - which means the HTMLEditor behaves like it isn't there.

      The APIs aren't deprecated at all yet, so I am not removing them as part of the applet removal, and I think there's a good case that since the HTML 3 (and 4 ) spec recognises the tag and that's what Swing claims to handle, that it should keep at least recognizing it, even if there's (still) nothing it can do with it.

      So no harm in keeping it, and maybe no real point in removing it, or even deprecating it. So this bug is maybe just a way of documenting that it has been considered, and a place to update with subsequent thinking.

      APIs :
      javax/swing/text/html/HTML.java :
           /**
            * Tag <applet>
            */
           public static final Tag APPLET = new Tag("applet");


      javax/swing/text/html/parser/DTD.java
         /**
           * The element corresponding to applet.
          */
          public final Element applet = getElement("applet");

            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: