Hi,

JComboBox  cb = new JComboBox().
cb.setEditable(true);//which allows to enter values in combobox
Integer item = (Integer)cb.getSelectedItem();
int value = item.intValue();

for further improvements go read swing tutorial in www.java.sun.com

ravi

Roman Novikov wrote:

> Hello!
>
>      Please, help me to use an editable subj. How can i get the Values
>      from it?
>      I have a JComboBox with String values in it and I want to enter
>      and get int values. Is it possible?
>      Any sample would be great.
>
>      Thanks.
>
> Sincerely,                          26.04.01
>      Roman
>
>    ("`-''-/").___..--''"`-._
>     `6_ 6  )   `-.  (     ).`-.__.`)
>     (_Y_.)'  ._   )  `._ `. ``-..-'
>      `--'_..-_/  /--'_.' ,'
>   (ll).-''  (((!.'  ((!.-'
>
> _______________________________________________
> Swing mailing list
> [EMAIL PROTECTED]
> http://eos.dk/mailman/listinfo/swing

_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to