KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > Choice


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: Choice.java,v $
11    Revision 1.5 2004/01/20 07:38:05 bobintetley
12    Bug fixes and compatibility methods
13
14    Revision 1.4 2004/01/15 10:11:14 bobintetley
15    Fixed AWT constructors/hierarchy
16
17    Revision 1.3 2003/12/14 09:13:38 bobintetley
18    Added CVS log to source headers
19
20 */

21
22 package swingwt.awt;
23
24 public class Choice extends swingwtx.swing.JComboBox {
25     
26     public Choice() { super(); }
27     public Choice(Object JavaDoc[] items) { super(items); }
28     public Choice(java.util.Vector JavaDoc items) { super(items); }
29     
30     public void add(String JavaDoc item) {
31         super.addItem(item);
32     }
33     
34     public int countItems() {
35         return super.getItemCount();
36     }
37     
38     public String JavaDoc 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