• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem in JComboBox

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have problem with JComboBox in my program.
i am adding items to JComboBox at the time of itemStateChanged of a JRadioButton.
Every time the selected JRadioButton is changed, i am changing the JComboBox items.
i am retrieving the selected JComboBox item at the time of JButton click.
But i got only the null value.
i have also used another JComboBox. The items for this JComboBox is added only at the time of constructig the object. When i selected an item in this JComboBox i get the selected value correctly.
What is the problem with the first JComboBox?
i need the immediate reply.
thank you.
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this case, we cannot imagine how your code behaves, without having a look at your code. Could you provide us a portion of your code so that we can figure out what is wrong with the code...

I guess the problem would be in the way you use the method of fetching the values from the JComboBox...
 
Ramaswamy Narayanan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry friends

actually the problem is not in java.
it is in my coding.
i have analyzed the code again and again and i got the solution.
sorry for my inconvenience.

thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic