>From: Erkin Nosinov <###@###.###>
This does not look like form output to me.
This is a multi-part message in MIME format.
--------------20C125688F9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi there!
1. This is a bug report.
2. It applies to JDK 1.0 AWT class library, java.awt.List class.
3. I am using JDK 1.0 with Netscape Navigator 2.0b6a.
4. The List class objects with multiple selection allowed do not add
vertical scrollbar when the number of items in the list becomes greater
than the number of visible rows. The rest works correctly and it still
allows scrolling with arrows keys. However the List does add the
scrollbar if the List component is added to the container with the
number of items already greater than the number of visible rows. Lists
with multiple selection set to false work correctly.
5. Configuration information:
hardware platform - Compaq DeskPro XL590
operating system - MS Windows 95
web browser - Netscape Navigator version 2.0b6.
6. Both the HTML and class files reside locally. The problem occurs when
I run either Netscape Navigator or the appletviewer.
7. listtest.html and ListTest.java files to reproduce the probelm
attached.
The workaround for this problem that I use is removing the list
from the container, manipulating items and then adding it back to the
container, but this involves doing the layout() on the container every
time which causes unnecessary flashing.
I hope that will help you to fix it, and I am very sorry to have
bothered you if this is not really a bug and I wasted your time.
Best regards and thanks for creating Java.
Erkin Nosinov.
If I create a new List with multiple selection
--------------20C125688F9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ListTest.java"
import java.awt.*;
import java.applet.*;
public class ListTest extends Applet{
int i = 0;
List multiList, singleList;
public void init () {
setBackground(Color.white);
setLayout(new FlowLayout());
multiList = new List (4,true);
fill(multiList);
singleList = new List (4,false);
fill(singleList);
add(multiList);
add(singleList);
add(new Button("Add"));
}
public void fill(List list) {
i++;
list.addItem("i = "+i);
return;
}
public boolean action (Event target, Object arg) {
if ("Add".equals(arg)) {
fill(multiList);
fill(singleList);
return true;
}
return false;
}
}
--------------20C125688F9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="listtest.html"
<BASE HREF="file:///C|/Hotwax/listtest.html">
<HTML>
<HEAD>
<!-- created: 1/1/96 -->
<TITLE>ListTest</TITLE>
</HEAD>
<BODY>
<APPLET code="ListTest.class" width=200 height=200>
</APPLET><P>
Press the "Add" button to add rows to both lists.
</BODY>
</HTML>
This does not look like form output to me.
This is a multi-part message in MIME format.
--------------20C125688F9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi there!
1. This is a bug report.
2. It applies to JDK 1.0 AWT class library, java.awt.List class.
3. I am using JDK 1.0 with Netscape Navigator 2.0b6a.
4. The List class objects with multiple selection allowed do not add
vertical scrollbar when the number of items in the list becomes greater
than the number of visible rows. The rest works correctly and it still
allows scrolling with arrows keys. However the List does add the
scrollbar if the List component is added to the container with the
number of items already greater than the number of visible rows. Lists
with multiple selection set to false work correctly.
5. Configuration information:
hardware platform - Compaq DeskPro XL590
operating system - MS Windows 95
web browser - Netscape Navigator version 2.0b6.
6. Both the HTML and class files reside locally. The problem occurs when
I run either Netscape Navigator or the appletviewer.
7. listtest.html and ListTest.java files to reproduce the probelm
attached.
The workaround for this problem that I use is removing the list
from the container, manipulating items and then adding it back to the
container, but this involves doing the layout() on the container every
time which causes unnecessary flashing.
I hope that will help you to fix it, and I am very sorry to have
bothered you if this is not really a bug and I wasted your time.
Best regards and thanks for creating Java.
Erkin Nosinov.
If I create a new List with multiple selection
--------------20C125688F9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="ListTest.java"
import java.awt.*;
import java.applet.*;
public class ListTest extends Applet{
int i = 0;
List multiList, singleList;
public void init () {
setBackground(Color.white);
setLayout(new FlowLayout());
multiList = new List (4,true);
fill(multiList);
singleList = new List (4,false);
fill(singleList);
add(multiList);
add(singleList);
add(new Button("Add"));
}
public void fill(List list) {
i++;
list.addItem("i = "+i);
return;
}
public boolean action (Event target, Object arg) {
if ("Add".equals(arg)) {
fill(multiList);
fill(singleList);
return true;
}
return false;
}
}
--------------20C125688F9
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="listtest.html"
<BASE HREF="file:///C|/Hotwax/listtest.html">
<HTML>
<HEAD>
<!-- created: 1/1/96 -->
<TITLE>ListTest</TITLE>
</HEAD>
<BODY>
<APPLET code="ListTest.class" width=200 height=200>
</APPLET><P>
Press the "Add" button to add rows to both lists.
</BODY>
</HTML>
- relates to
-
JDK-1234072 (fp.bugs 3052) Scrollbar is not working correctly on Win 95
- Closed