Hello all,
In Jxam, one of the qstns asked say tru/false about 'java.awt.List' related info. The author says the foll is false.
Possible Answer 3:
A vertical scroll bar will be added automatically if needed. I thought List will have scroll bars if needed, since I have seen in some GUIs. So I checked the SAME example given in
Java Doc. In JavaDoc the image shown DOES NOT show scroll bars. But when I tested the same example on Win 98 , JDK 1.2.2, it shows the scroll bars. So what do we say if this kind of qstns come up in the Exam.
Thank you all.
regds
maha anna
Please refer to the online
Java Doc here, <pre>
import java.awt.*;
class mframe extends Frame{
public mframe(){
setLayout(new FlowLayout());
List lst = new List(4, false);
lst.add("Mercury");
lst.add("Venus");
lst.add("Earth");
lst.add("JavaSoft");
lst.add("Mars");
lst.add("Jupiter");
lst.add("Saturn");
lst.add("Uranus");
lst.add("Neptune");
lst.add("Pluto");
add(lst);
setSize(400,300);
setVisible(true);
}
public static void main(String args[]){
new mframe();
}
}
</pre>
[This message has been edited by maha anna (edited April 24, 2000).]