1 21 22 package swingwt.awt; 23 24 public class Choice extends swingwtx.swing.JComboBox { 25 26 public Choice() { super(); } 27 public Choice(Object [] items) { super(items); } 28 public Choice(java.util.Vector items) { super(items); } 29 30 public void add(String item) { 31 super.addItem(item); 32 } 33 34 public int countItems() { 35 return super.getItemCount(); 36 } 37 38 public String getItem(int index) { 39 return super.getItemAt(index).toString(); 40 } 41 42 public void select(int index) { 43 super.setSelectedIndex(index); 44 } 45 46 } 47 | Popular Tags |