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

JEditorPane: MAXLENGTH attribute for input type=password does not work.

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.6
    • Verified

      In JEditorPane, the text field doesn't limit your input based on this attribute. Setting it doesn't seem to do anything.

      Here is a sample file:

      <!DOCTYPE HTML PUBLIC "-//HotJava QA//DTD HTML 3.2//EN">
      <HTML>
      <HEAD>
      <TITLE>Testing HotJava based on the 3.2 html spec</TITLE>
      </HEAD>
      <BODY bgcolor="white" >

      <h1>Tests Input Password Form Element</h1>
      <h2>Definition</h2>
      <em>type=password</em>
      This is like type=text, but echoes characters using a character
      like * to hide the text from prying eyes when entering passwords.
      You can use size and maxlength attributes to control the visible
      and maximum length exactly as per regular text fields.


      <hr>
      <h2>Expected Results</h2>

      This form has type set to password entering characters should return * only
      <FORM>
      <input type=password size=12 name=pw>
      </FORM>

      This form has type set to password the maximum character length should be 2
      <FORM>
      <input type=password size=4 name=pw maxlength=2>
      </FORM>


      </BODY>
      </HTML>


      edmund.lou@eng 1999-10-19

            svioletsunw Scott Violet (Inactive)
            elousunw Edmund Lou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: