| setSelectedIndex() | ใช้กำหนดว่า จะเลือกข้อมูลที่ตำแหน่งไหน ใน object JComboBox |
|---|
method:setSelectedIndex ( int_index );
return type:void
content:ใช้กำหนดว่า จะเลือกข้อมูลที่ตำแหน่งไหน ใน object JComboBox
example:Vector vector = new Vector (); vector.addElement ( "bamboo" ); vector.addElement ( "labcode" ); JComboBox combo_box = new JComboBox ( vector ); combo_box.setSelectedIndex ( 1 );