[nbusers] Re: How to check the values in jCombobox??

  • From: Edson Richter < >
  • To:
  • Subject: [nbusers] Re: How to check the values in jCombobox??
  • Date: Fri, 3 May 2013 14:56:42 -0300
  • Organization: Simkorp Inform├ítica Ltda

Try here: http://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html


Edson Richter

Em 03/05/2013 12:38, prabhukrish escreveu:
Hi i'm using 3 jCombobox to get DOB from  the user..this the code how i did 

         [Integer birthdate=(Integer)date.getSelectedItem();
         Integer  birthmonth=(Integer) month.getSelectedItem();
         Integer  birthyear=(Integer) year.getSelectedItem();]

I didn't use mode properties for jCombobox...to get the values i used for 
loop as follows..

For date...
       [private void dateActionPerformed(java.awt.event.ActionEvent evt) {
for(int i=1;i<=31;i++)

for month
[ private void monthActionPerformed(java.awt.event.ActionEvent evt) {
for(int l=1;l<=12;l++)
     }  ]

for year

    [private void monthActionPerformed(java.awt.event.ActionEvent evt) {
for(int j=1;j<=12;j++)
     } ]

so my question is
    1.how set err message if the user didn't select DOB???

     In jCombobox First item name for DATE is (date),MONTH is (month),YEAR is 

    2.At the run time the jCombobox shows only one item (date) for all 
jcombobox....It shows all item when i click the that first item(date) for all 
jCombobox.how to change that???

Thanks in advance,,,

[nbusers] How to check the values in jCombobox??

prabhukrish 05/03/2013

[nbusers] Re: How to check the values in jCombobox??

Edson Richter 05/03/2013

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 25 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20150226.965aeb8). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm