my dog learned polymorphism
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
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: 10817

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!]
I agree. Here's the link:
subject: ItemStateChanged Event
It's not a secret anymore!