This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one 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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 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: 10642

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