This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes ItemStateChanged Event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ItemStateChanged Event" Watch "ItemStateChanged Event" New topic

ItemStateChanged Event

Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 290

Hi all
i have one lable and a combo box which has list on languages supported.
on selecting the language i need the label text should be changed according to the language selected from combo box.

i done as follow

But its not working please help me.

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10747

Originally posted by Chiru Raj:
...But its not working please help me.

Have you added an ItemListener to the combo box? It has an itemStateChange method. Your code shows some langSelectionComboItemStateChanged() method. Who calls this method? Are you sure this method is really being called?

Usually you can get notified on JComboBox changes by either an ItemListener or an ActionListener.

[Edit: Corrected typos]
[ July 22, 2008: Message edited by: Maneesh Godbole ]

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: ItemStateChanged Event
It's not a secret anymore!