Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Java Swing bug or error in program??(Actionperformed not triggered for JComboBox)
Java Swing bug or error in program?? [message #648076] Tue, 11 January 2011 06:12
Niranjani S is currently offline Niranjani SFriend
Messages: 3
Registered: August 2010
Junior Member
I have an ActionListener attached to a JComboBox(uneditable). Once an item from the JComboBox is selected, I have to make the next button in the frame visible.

The skeleton of the code looks like this:

public void actionPerformed(ActionEvent evt)
//Display an alert message

//Do other actions

It is found that actionPerformed is called only when the second, third, fourth (and so on) items are selected. But actionPerformed is not called when the first item is selected the very first time. But if the first item is selected after selecting other items actioPerformed gets called and the code works fine.

This error appears on some systems and doesn't on other systems. Any help in this regard would be appreciated.

Thanks in Advance!!
Previous Topic:Getting Java (DynWeb) Build Path to work correctly
Next Topic:How can I extend JDT's annotation validation mechanism?
Goto Forum:

Current Time: Sat Jun 23 01:01:58 GMT 2018

Powered by FUDForum. Page generated in 0.02150 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top