-
Bug
-
Resolution: Fixed
-
P3
-
1.1
-
1.1
-
ppc
-
windows_nt
-
Not verified
Using jdk1.1 (july 23) for Win32,
with WinNT, it is not possible to select more than one
item in a list which was constructed to allow multiple selections.
with Win95, the items in the list disappear from view as soon as the mouse is
dragged over the list, all items are selected automatically as soon as the mouse
is clicked, and then clicks are no longer acknowledged.
sample:
----------------------------
import java.awt.*;
public class lis extends java.applet.Applet {
Panel p;
List mylist;
public void init() {
p = new Panel();
setLayout(new BorderLayout());
mylist = new List(5,true);
add("Center", p);
p.add(mylist);
mylist.addItem("zero");
mylist.addItem("one");
mylist.addItem("two");
p.show();
System.out.println("select the items and click outside of the list on the appletviewer");
}
public boolean mouseDown (Event evt, int x, int y) {
int i;
int indexes[] = new int[5];
indexes = mylist.getSelectedIndexes();
System.out.print("the items selected are:");
for (i=0;i<indexes.length;i++) {
System.out.print(indexes[i]);
System.out.print(" ");
} System.out.println();
return true;
}
}
with WinNT, it is not possible to select more than one
item in a list which was constructed to allow multiple selections.
with Win95, the items in the list disappear from view as soon as the mouse is
dragged over the list, all items are selected automatically as soon as the mouse
is clicked, and then clicks are no longer acknowledged.
sample:
----------------------------
import java.awt.*;
public class lis extends java.applet.Applet {
Panel p;
List mylist;
public void init() {
p = new Panel();
setLayout(new BorderLayout());
mylist = new List(5,true);
add("Center", p);
p.add(mylist);
mylist.addItem("zero");
mylist.addItem("one");
mylist.addItem("two");
p.show();
System.out.println("select the items and click outside of the list on the appletviewer");
}
public boolean mouseDown (Event evt, int x, int y) {
int i;
int indexes[] = new int[5];
indexes = mylist.getSelectedIndexes();
System.out.print("the items selected are:");
for (i=0;i<indexes.length;i++) {
System.out.print(indexes[i]);
System.out.print(" ");
} System.out.println();
return true;
}
}