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

List.preferredSize(int) doesn't take scrollbars into account

    • 1.1
    • sparc
    • solaris_2.4
    • Not verified

      Creating a List using the List(int, boolean) constructor creates a List
      of the wrong height.

      Machine config: I'm running this on my SS20, displaying on my Win95 PC running eXceed via ISDN.

      Test: run HotJava and point it at this page; you'll notice that the List on the right is only one line wrong, even though the constructor is being handed lines=2 (see size parameter below). Or just create a List object like so:

      list = new List(2, true);

      list.addItem("Insipid");
      list.addItem("Totally stylin'");
      list.addItem("Completely Hapnin'");
      list.addItem("I wish I knew");

      then display it in a suitable Container. Here's the HTML:

      <html>
      <head>
      <title>A Form</title>
      </head>

      <body>

      <h2>Who are you?</h2>

      <FORM method="POST" action="mailto:###@###.###">

      Search
      <select name="what">
      <option value="news">netnews
      <option value="web" selected>the web
      </select>

      In what fashion?
      <select name="fashion" size=2 multiple>
      <option value="stupid">Insipid
      <option value="stylee" selected>Totally stylin'
      <option value="happening">Completely Hapnin'
      <option value="confused">I wish I knew
      </select>

      <p>
      <INPUT TYPE="SUBMIT" VALUE="Submit">
      <INPUT TYPE="RESET" VALUE="Clear">
      <p>

      </FORM>
      </body>
      </html>

            tballsunw Tom Ball (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: